Remove unnecessary whitespace from string

string:remove_extra_space(STRING $string) : STRING

string:remove_extra_space(' hi   there   ')
#=> "hi there"

string:remove_extra_space("\t\n this that \t     !")
#=> "this that !"

# all new line characters are replaced with a single space 
# https://i.imgur.com/l6hHcDh.png

Copyright ©2013-2022 SunSed®. All rights reserved.