Append String
(Expression C1, Expression C2, Expression C3)
Description |
Append a string to another string. |
Arguments |
Expression C1 is the string being appended with the string. Expression C2 is the string to append to . Expression C3 determines from which side of to append the character. Valid values are: ‘R’ (Right), ‘L’ (Left). Default value is ‘L’. |
Return |
A Character string. The function will return the after being appended with character from the side specified in . |
Examples |
Example 1 |
APPEND STRING (abcdabxyz,efgh,L) |
Result |
efghabcdabxyz |
Example 2 |
APPEND STRING (abcdabxyz,efgh,R) |
Result |
abcdabxyzefgh |
Compress Character
(Expression C1, Expression C2)
Description |
Replace duplicate appearances of a character in a string with a single appearance. |
Arguments |
Expression C1 is the string being searched for the duplicated Expression C2 character. Expression C2 is the character being searched in Expression C1 for duplicated appearances. |
Return |
A character string. The function will return the Expression C1 after replacing the duplicated appearances of Expression C2 with a single appearance. |
Examples |
Example 1 |
Compress character (ab cdabxy z,SPACE) |
Result |
ab cdab xy z |
Example 2 |
COMPRESS CHARACTER (abbbcdabxybz,b) |
Result |
abcdabxyzb |
Example 3 |
COMPRESS CHARACTER (00 1000,0) |
Result |
010 |
Mantissa
(Expression N1, Expression N2)
Description |
Calculate the mantissa value of a number modulus by another number. |
Arguments |
Expression N1 is the number modulated by Expression N2.
Expression N2 is the modulus number used with Expression N1. |
Return |
A character string which holds the mantissa value of Expression N1 modulus Expression N2. |
Examples |
Example 1 |
MANTISSA (10,3) |
Result |
1 |
Examples |
Example 2 |
MANTISSA (9,3) |
Result |
0 |
Example 3 |
MANTISSA (55.45,3.27) |
Result |
3.13 |
Max String Length
(Expression C1, Expression N1, Expression C2)
Description |
Set the maximum length of a string. |
Arguments |
Expression C1 is the string being processed according to the maximum length specified in Expression N1. Expression N1 is the maximum allowed length of Expression C1.
Expression C2 determines from which side of Expression C1 to reduce the extra characters according to the maximum length specified in Expression N1. Valid values are: ‘R’ (Right), ‘L’ (Left). Default value is ‘L’. |
Return |
A character string. The function will return Expression C1 after reducing it size to the maximum length specified in Expression N1 from the side specified by Expression C2. If the Expression C1 string length is smaller than the value specified by Expression N1, the Expression C1 string will be returned. |
Examples |
Example 1 |
MAX STRING LENGTH (abcdabxyz,4,L) |
Result |
abcd |
Example 2 |
MAX STRING LENGTH (abcdabxyz,4,R) |
Result |
abxyz |
Example 3 |
MAX STRING LENGTH (abcdabxyz,15,L) |
Result |
abcdabxyz |
Pad String
(Expression C1, Expression N1, Expression C2, Expression C3)
Description |
Add a repeating character to a string according to the maximum desired length of the whole string. |
Arguments |
Expression C1 is the string being processed. Expression N1 is the desired new length of Expression C1 after padding it with Expression C2. Expression C2 is the character to pad Expression C1. Expression C3 determines from which side of Expression C1 to pad the Expression C2 character. Valid values are: ‘R’ (Right), ‘L’ (Left). The default value is ‘L’. |
Return |
A character string. The function will return the Expression C1 after being padded with Expression C2 character to the max length specified in Expression N1 starting from the side specified in Expression C2. If Expression C1 string length is equal or bigger than Expression N1, no padding will be performed. |
Examples |
Example 1 |
PAD STRING (abcdabxyz,15,e,L) |
Result |
eeeeeeabcdabxyz |
Example 2 |
PAD STRING (abcdabxyz,13,f,R) |
Result |
abcdabxyzffff |
Example 3 |
PAD STRING (abcdabxyz,8,g,L) |
Result |
abcdabxyz |
Power
(Expression N1, Expression N2)
Description |
Calculate the mathematical power value of a number. |
Arguments |
Expression N1 is the number to be processed. Expression N2 is the power value to be used with Expression N1. |
Return |
A character string which holds the power Expression N2 of Expression N1. |
Examples |
Example 1 |
POWER (9,2) |
Result |
81 |
Example 2 |
POWER (3,3) |
Result |
27 |
Remove String
(Expression C1, Expression C2)
Description |
Remove all occurrences of a given string. |
Arguments |
Expression C1 is the string being processed. Expression C2 is the string to search for in Expression C1 and remove. |
Return |
A character string. The function will return the Expression C1 string after removing all occurrences of Expression C2. |
Examples |
Example 1 |
REMOVE STRING (abcdabxyz,ab) |
Result |
cdxyz |
Example 2 |
REMOVE STRING (abcdabxyz,abc) |
Result |
dabxyz |
Example 3 |
REMOVE STRING (1000,0) |
Result |
1 |
Replace String
(Expression C1, Expression C2, Expression C2)
Description |
Replace all occurrences of a given string with another string. |
Arguments |
Expression C1 is the string being processed. Expression C2 is the string to search for in Expression C1 and replace with the string specified in Expression C3. Expression C3 is the string to replace Expression C2 in Expression C1. |
Return |
A character string. The function will return the Expression C1 string after replacing all occurrences of Expression C2 with Expression C3. |
Examples |
Example 1 |
REPLACE STRING (abcdabxyz,ab,gh) |
Result |
ghcdghxyz |
Example 2 |
REPLACE STRING (abcdabxyz,abc,gh) |
Result |
ghdabxyz |
Example 3 |
REPLACE STRING (1.1.2008,.,-) |
Result |
1-1-2008 |
String Position
(Expression C1, Expression C2, Expression C3, Expression N1)
Description |
Return the starting position of a string within another string. |
Arguments |
Expression C1 is the string in which Expression C2 should be searched for. Expression C2 is the string being searched in Expression C1 string. Expression C3 determines from which side of Expression C1 to start the search for Expression C2. Valid values are: ‘R’ (Right), ‘L’ (Left). The default value is ‘L’. Expression N1 is the requested appearance number Expression C2 in Expression C1. |
Return |
A character string. The function will return the position where the Expression C2 string starts in Expression C1. If the Expression C2 cannot be found in Expression C1, the function will return 0 (zero). |
Examples |
Example 1 |
STRING POSITION (abcdabxyz,ab,L,1) |
Result |
1 |
Example 2 |
STRING POSITION (abcdabxyz,ab,R,1) |
Result |
4 |
Example 3 |
STRING POSITION (abcdabxyz,ab,L,2) |
Result |
5 |
Example 4 |
STRING POSITION (abcdabxyz,ef,L,1) |
Result |
0 |
Sub String
(Expression C1, Expression N1, Expression N2, Expression C2)
Description |
Extract a string from another string. |
Arguments |
Expression C1 is the string to extract from starting from the side specified in Expression C2 using the offset position specified in Expression N1 in length specified by Expression N2. Expression N1 is the offset position in Expression C1 to extract the desired string starting from the side specified by Expression C2. Expression N2 is the maximum length of the string to extract from Expression C1. Expression C2 determines from which side of Expression C1 to calculate the offset position specified in Expression N1. Valid values are: ‘R’ (Right), ‘L’ (Left). Default value is ‘L’. |
Return |
A character string. The function will return the string extracted from Expression C1 according to the offset position specified in Expression N1 and maximum length specified by Expression N2. If the specified maximum length is beyond the Expression C1 boundary, the extracted string length will not exceed this boundary. |
Examples |
Example 1 |
SUB STRING (abc dabx yz,1,5,L) |
Result |
abc d |
Example 2 |
SUB STRING (abc dabx yz,3,5,L) |
Result |
c dab |
Example3 |
SUB STRING (abc dabx yz,1,5,R) |
Result |
bx yz |
Example 4 |
SUB STRING (abc dabx yz,4,2,R) |
Result |
bx |
Example 5 |
SUB STRING (abc dabx yz,7,9,L) |
Result |
bx yz |