String Functions The following table lists the string functions supported by Rational Statemate. Function Argument Type Return Type Meaning CHAR_TO_ASCII(x) S I ASCII value of Ith character of S ASCII_TO_CHAR(x) I S Returns S of one character with ASCII value I INT_TO_STRING(x) I S Converts I to decimal string; I can be negative STRING_CONCAT(x,y) S1, S2 S Concatenates strings STRING_EXTRACT(x,y,z) S, I1, I2 S Extracts a string of length I2 from index I1 of S STRING_INDEX (x,y,z) S1, I, S2 I Index of sub-string S2 within S1; –1 if not found STRING_LENGTH(x) S I String length STRING_TO_INT(x) S I Integer value of a decimal string Note: The index of the left-most character in a string is 0.
The following table lists the string functions supported by Rational Statemate.
CHAR_TO_ASCII(x)
I
S
ASCII_TO_CHAR(x)
INT_TO_STRING(x)
STRING_CONCAT(x,y)
STRING_EXTRACT(x,
y,z)
I2
I1
STRING_INDEX (x,y,z)
S2
S1
–
1
STRING_LENGTH(x)
STRING_TO_INT(x)