Topic: DMD0165 STRDELETE - Delete Substring |
|
The Delete Substring (STRDELETE) instruction will remove characters from a String. When characters are deleted, any trailing characters are shifted toward the beginning of the string to take their place.
|
|
Parameters:Note: Use the F9 key or click the 'three dot box' at the right edge of the parameter field 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.
Input / Output String - the String that contains the characters to be deleted. This can be any User-defined or System-defined String.
Starting at Offset - specifies the position of the first character to be deleted. This can be any constant value from 0 to 1023 or any readable numeric location containing a value within that range. The first character is at offset 0. If the specified offset is longer than the current length of the string , Input / Output String will remain unchanged and an "Argument out of range" Warning message will be generated.
Number of Characters to Delete - specifies how many contiguous characters to delete from the string. This can be any constant value from 0 to 1023 or any readable numeric location containing a value in that range.
|
|
Status Display:The Status display of the Delete Substring instruction will only display as many of the characters of the String as will fit within the borders of the instruction, typically this is about 50 characters.
Before executing the STRDELETE instruction:
After executing the STRDELETE instruction:
|
|
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
STRDELETE - Delete Substring
|
|
Related Topics:
String Scripting Language Reference
|
|
Rung Example:
|
|