System Debug Reference Manual (32650-90888)

452 Chapter10
System Debug Standard Functions
func strlen
Parameters
insert
The string to be inserted into
source
.
source
The
source
string into which
insert
is to be inserted.
position
The position where
insert
is to be inserted in
source
. String indices are
1-based. (That is, indices are 1, 2, 3, ... rather than 0, 1, 2, ...) If
position
is greater than the string length of
source
,
insert
is appended to
source
.
Examples
$nmdebug > var name "Smith, "
$nmdebug > wl strins(name, "Dear Ms. How are You?", 10)
Dear Ms. Smith, How are You?
Insert the string variable NAME into a literal string at position 10.
$nmdebug > wl strins(" NOW!", "Go Home", 100):"qo"
"Go Home NOW!"
Insert "NOW!" into the source at position 100. Since the source is only seven characters
long, "NOW!" is appended at the end of the source string.
Limitations, Restrictions
If the resultant string is larger than the maximum supported string length (see the STRMAX
function), it is truncated.
func strlen
String length. Returns the current size of a string.
Syntax
strlen (
source
)
Formal Declaration
strlen:u32 (
source
:str)
Parameters
source
Any string literal or variable.
Examples
$nmdebug > wl strlen("")
$0