splitvar/utils.py
def sanitise(string, replacements={'_' : '-'}):
    """
    Substitute characters that are used as separators in the pathname and other
    special characters if required
    """
    for c in replacements:
        string = string.replace(c, replacements[c])

    return string

    Substitute characters that are used as separators in the pathname and other
    special characters if required
    
Substitute characters that are used as separators in the pathname and other
special characters if required
Substitute characters that are used as separators in the pathname and other special characters if required
def sanitise(string, replacements={'_' : '-'}):
    for c in replacements:
        string = string.replace(c, replacements[c])
    return string
def sanitise ( string , replacements = { '_' : '-' } ) : for c in replacements : string = string . replace ( c , replacements [ c ] ) return string
Substitute characters that are used as separators in the pathname and other
special characters if required
Substitute characters that are used as separators in the pathname and other special characters if required
"""
    Substitute characters that are used as separators in the pathname and other
    special characters if required
    """
string
replacements