def ignoreStrReplace(line, cur, rep):
    """Wrapper for str.replace to ignore strings"""
    if '"' in line:
        #Split string at quotation marks
        lsplit = line.split('"')
        #Replace items contained within even partitions
        lsplit[::2] = [spl.replace(cur, rep) for spl in lsplit[::2]]
        #Rejoin the partitions
        line = '"'.join(lsplit)
    elif "'" in line:
        #Split string at quotation marks
        lsplit = line.split("'")
        #Replace items contained within even partitions
        lsplit[::2] = [spl.replace(cur, rep) for spl in lsplit[::2]]
        #Rejoin the partitions
        line = '"'.join(lsplit)
    else:
        line = line.replace(cur, rep)
    return line