def force_str_length(string, length):
    """Truncates and/or pads a string to be a specific length"""
    string = str(string)
    while len(string) < length:
        string += " "
    return string[0:length]