added *_contrary functions to trim non whitespace characters
fixed a bug with strings that contains only whitespaces
Merge origin/master