Topic: DMD0172 STRTRIM - Trim Whitespace |
|
The Trim Whitespace (STRTRIM) instruction will remove all whitespace characters from the beginning and / or end of a String. Whitespace characters between characters in the string are not removed. Whitespace characters typically represent horizontal or vertical space, the ones the Trim Whitespace instruction will remove are Space <SP>, Horizontal Tab <TAB>, Carriage Return <CR>, Line Feed <LF>, Form Feed <FF>, Vertical Tab <VT>.
|
|
Parameters:Note: Use the F9 key to open the Default Element Selection Tool (the Element Picker or the Element Browser) or use the Down-Arrow key (Auto-Complete) on any parameter field to see a complete list of the memory locations that are valid for that parameter of the instruction.
String - the String that contains the data to be trimmed. This can be any writable user-defined or system-defined String.
Trim - selects which
end or ends of the string to trim:
|
|
Status Display:Before executing the STRTRIM instruction:
After executing the STRTRIM instruction:
The Status display will only show as many of the characters of the String as will fit within the borders of the instruction, typically this is about 50 characters.
|
|
See Also:STR2REAL - Convert String to Real
STR2INT - Convert String to Integer
STRCASE - Convert String to UPPER / lower Case
STRCOPYR - Copy a Range of Strings
|
|
Related Topics:
String Scripting Language Reference
|
|
Rung Example:
|
|