Typically named ltrim and rtrim respectively, or in the case of Python: lstrip and rstrip.
With Common Lisp's string-trim function, the parameter (called character-bag) is required.
For example, Apache Jakarta's StringUtils has a function called stripToNull which returns null in place of an empty string.
Space normalization is performed by the function named Trim() in spreadsheet applications (including Excel, Calc, Gnumeric, and Google Docs), and by the normalize-space() function in XSLT and XPath, While most algorithms return a new (trimmed) string, some alter the original string in-place.
Delphi's Trim function considers characters U+0000 (NULL) through U+0020 (SPACE) to be whitespace.