Skip to main content

remove_repeating

Remove repeating module names from string.

def remove_repeating(
substr: str,
s: str
) - > str

Remove repeating module names from string.

Parameters

NameTypeDescription
substrstrThe module name or substring to be used as the basis for removal.
sstrThe target string containing potential duplicate module name references to be cleaned.

Returns

TypeDescription
strThe string with all occurrences of the module name removed except for the first one.