source | A string containing the data to clean. |
Return: | CleanSpaces returns either a STRING or UNICODE value, as appropriate. |
All variations of the CleanSpaces function return the source string with all instances of multiple adjacent space characters (2 or more spaces together, or a tab character) reduced to a single space character. It also trims off all leading and trailing spaces.
Example:
A := STD.Str.CleanSpaces('ABCDE ABCDE'); //A contains 'ABCDE ABCDE' UNICODE C := STD.Uni.CleanSpaces(U'ABCDE ABCDE'); //C contains U'ABCDE ABCDE'