@staticmethod
def trimString(data):
    """removes leading and ending spaces in a string"""
    while len(data) > 0 and (data[0] == ' ' or data[0] == '\n'):
        data = data[1:]
    while len(data) > 0 and (data[-1] == ' ' or data[-1] == '\n'):
        data = data[:-1]
    return data
