String AL intrinsics


Length (string s) result integer
Return the length of the string.

Set_length (string inout s; integer i)
Sets the length of the string. If the integer value i is less than the length, then the string is truncated, otherwise it is padded by the required number of blanks.

Trim (string inout s)
Remove trailing blanks from string.

Upcase (string inout s)
Change all characters in string to upper case.

Lowcase (string inout s)
Change all characters in string to lower case.

Left_justify (string inout s)
Shove non-blanks in string to the left.

Right_justify (string inout s)
Shove non-blanks in string to the right.

Replace (string inout s1; integer i; string s2)
Replace the contents in string s1 from position i onwards with the contents of string s2.

Substring (string s; integer i1, i2) result string
Return the substring between positions i1 and i2 in string s.

Find (string s1, s2) result integer
Return position of first character of substring s2 in string s1. Return 0 no such substring is found.

Concat (string s1, s2) result string
Concatenate the strings s1 and s2 and return the result.

Compare (string s1, s2) result logical
Compare string s1 and s2 for equality, allowing for wildcard characters in string s2. The wildcard characters are:
*	any string
%	any single character
#	any number
+	any single digit

Append (string inout s1, s2)
Append the contents of string s2 to string s1.

Per Kraulis 18 Apr 1996.