Add new trimming methods to JS string