func str [ System Debug Reference Manual ] MPE/iX 5.0 Documentation
System Debug Reference Manual
func str
Returns a substring of a source string.
Syntax
str (source position length)
Formal Declaration
str:str (source:str position:u16 length:u16)
Parameters
source The string from which to extract the substring.
position The index of the first character to extract. String
indices are 1-based. (That is, indices are 1, 2,
3,...rather than 0, 1, 2,...)
length The number of characters to extract. If this value is
larger than the actual number of characters in the
string, the string is returned from the starting
position to the end without an error indication.
Examples
$nmdebug > = str("I am sincere.", 6, 3)
"sin"
Starting at position 6, extract the next three characters.
$nmdebug > = str("Hello mom! I don't know how long this is", 7, 1000)
"mom! I don't know how long this is"
Extract the remainder of the string starting at position 7.
Limitations, Restrictions
none
MPE/iX 5.0 Documentation