Topic: DMD0169

STRINSERT - Insert Substring


The Insert Substring (STRINSERT) instruction will insert a copy of the characters from a String or a string literal into another String.

 

 

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.

 

 

Insert String or Text - specifies a String that contains the source characters to insert, or a string literal.

 

Into String - the String to insert the new characters into.

 

Starting at Offset - specifies the position where the first character will be inserted. This can be any constant value from 0 to 1023 or any readable numeric location containing a value within that range.

 

Note: If the specified offset is longer than the current length of the Into String (<string>.Length), the new text characters will be appended to the Into String.

 

Note: If the specified offset is longer than the maximum length of the Into String (<string>.MaxLen), the new text characters will be appended to the Into String 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).

 


Status Display:

The Status display of the Insert 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 STRINSERT instruction:

 

After executing the STRINSERT instruction:


See Also:

 


Related Topics:

String Functions Overview

 

String Scripting Language Reference

 


Rung Example: