UnicodeUnspace (Unicode function)
Remove whitespace characters from the string (Unicode class)
[Introduced in Sirius Mods 8.0]
The UnicodeUnspace intrinsic function removes the whitespace characters from the Unicode string method object, and it returns the resulting string. Options are available to:
- Define which character or characters are to be interpreted as whitespace
- Remove leading whitespace, trailing whitespace, both, or neither
- Collapse to a single whitespace character any sequences of non-leading, non-trailing whitespace
Syntax
%outUnicode = unicode:UnicodeUnspace[( [Spaces= string], [Leading= boolean], - [Trailing= boolean], - [Compress= boolean])]
Syntax terms
%outUnicode | A Unicode variable to receive the result of the UnicodeUnspace function. |
---|---|
unicode | The method object Unicode string. |
Spaces | Spaces is an optional, name required, parameter that is a Unicode string that specifies the set of characters considered to be whitespace. The default set is the blank space (' ' ) character.
If you specify multiple Spaces characters, the first character is the replacement space character: a single one of these is substituted for each sequence of one or more non-leading, non-trailing Spaces characters in the method object string. |
Leading | Leading is an optional, name required, parameter that is a Boolean Enumeration value that specifies whether to strip all leading whitespace characters. The default is True, strip leading whitespace. |
Trailing | Trailing is an optional, name required, parameter that is a Boolean enumeration value that specifies whether to strip all trailing whitespace characters. The default is True, strip trailing whitespace. |
Compress | Compress is an optional, name required, parameter that is a Boolean enumeration value that specifies whether to collapse each sequence of spaces to a single space. The default is True, collapse such sequences. |
Usage notes
- Duplicate Spaces characters are tolerated and do not affect the result.