def getWhiteSpaceLessStringMap(string):
    """
    Map the characters in a string from which whitespace has been removed
    to their indices in the original string.
    """
    map = {}
    whiteSpaceLessPos = 0
    for originalPos in range(len(string)):
        if not string[originalPos].isspace():
            map[whiteSpaceLessPos] = originalPos
            whiteSpaceLessPos += 1
    return map