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 to take their place.

Parameters:

Note: Use the F9 key (Element Browser) or Down-Arrow key (Auto-Complete) at any time to see a complete list of the memory locations that are valid in the current field of the instruction.

 

Input / Output String - the String that contains the characters to be deleted. This can be any String element.

 

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.

 

Note: If the specified offset is longer than the current length of the String (<string>.Length), Input / Output String will remain unchanged and an "Argument out of range" system warning message will be generated (this warning can be viewed at System Information-> System Status tab -> Warning Messages box, and in the global string ERR).

 

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 within 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:

 


Related Topics:

String Functions Overview

 

String Scripting Language Reference

 


Rung Example: