Topic: DMD0169

Help File Version: 2.10.0.636

STRINSERT - Insert Substring


The Insert Substring (STRINSERT) instruction will insert a copy of the characters from one string or a String LiteralClosed Zero or more characters enclosed in double quotes, as in "hello", and may include both simple escape sequences (such as \t for the tab character) and hexadecimal data (such as 0xAA). into another string at a specified location with the destination string.

 

 


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.

 

Insert String or Text - specifies a String that contains the source characters to insert, or a String LiteralClosed Zero or more characters enclosed in double quotes, as in "hello", and may include both simple escape sequences (such as \t for the tab character) and hexadecimal data (such as 0xAA)..

 

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. If the Offset is longer than the current length of the Into String, the new text characters will be appended to the Into String. If the 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:

Before executing the STRINSERT instruction:

 

 

After executing the STRINSERT instruction:

 

 

The Status display of the Insert Substring instruction will only display as many of the characters of the destination 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

 

STRCLEAR - Clear Strings

 

STRCMP - String Compare

 

STRCOPY - Copy String

 

STRCOPYR - Copy a Range of Strings



STRDELETE - Delete Substring

 

STRFIND - Find within String

 

STRINSERT - Insert Substring

 

STRPRINT - Print to String

 

STRSUB - Get Substring

 

STRTRIM - Trim Whitespace

 

STRTRUNC - Truncate String

 


Related Topics:

String Functions Overview

 

String Scripting Language Reference

 


Rung Example: