so this is definitely not something which should go in the generic function. whitespace at end of a string is acceptable