Page History
...
Parameter | Description |
---|---|
String | The string to be trimmed. (REQUIRED) |
Flags | Flags that control how the string is to be trimmed. (OPTIONAL) |
TrimChars | The characters to be trimmed in addition to standard whitespace characters. (OPTIONAL) |
Remarks
The Trim service does everything the OI Trim method does (and by extension, the TrimF and TrimB functions), but gives you more control.
...
Flag | Name | Description |
---|---|---|
F | Trim Front | If present, this flag indicates that leading trim characters should be removed completely |
B | Trim Back | If present, this flag indicates that trailing trim characters should be removed completely |
M | Trim Middle | If present, this flag indicates that sequences of trim characters found within the string should be condensed |
Q | Trim Quotes | If present, this flag indicates that string within quotes should be trimmed |
A | Additional Absolute Trim Chars | If present, this flag indicates that any characters in the TrimChars parameter should be instead of whitespace trim characters. If you omit this flag, the characters in TrimChars are added to the default whitespace trim standard white space characters. |
To set the flags parameter, just include the characters you want into a string. If you only want to trim the front, then you pass "F". If you want to trim the front and back, including quotes, then you would pass "FBQ". If you omit this parameter or leave it blank, then the default is "FMBQ", which results in the same functionality as OI's Trim function.
...