def _getFirstNonSpacePos(text):
    """Provides the index of the first non-space character in the given line"""
    for pos in range(len(text)):
        if text[pos] not in [' ', '\n', '\r']:
            return pos
    return -1
