Function |
Usage |
Syntax |
Function
Example |
Returns |
ANYALNUM |
Searches for the first
occurrence of an Alphanumeric character in a string.
Second argument gives the position to start the search. |
ANYALNUM(String
<,startpos>) |
Anyalnum("%$#sa1",2) |
2 |
ANYALPHA |
Searches for the first
occurrence of an Alphabet character in a string.
Second argument gives the position to start the search. |
ANYALPHA(String
<,startpos>) |
Anyalpha("%$#sa1",1) |
4 |
ANYDIGIT |
Searches for the first
occurrence of an Alphabet character in a string.
Second argument gives the position to start the search. |
ANYDIGIT(String
<,startpos>) |
Anydigit("%$#sa1",1) |
6 |
ANYLOWER |
Searches for the first
occurrence of an Alphabet character in a string.
Second argument gives the position to start the search. |
ANYLOWER(String
<,startpos>) |
Anylower("%$#sa1",1) |
4 |
ANYPUNCT |
Searches for the first
occurrence of a punctuation (! " # $ % & ' ( ) * + , - . / : ; <
= > ? @ [ \ ] ^ _ ` { | } ~) character in a string.
Second argument gives the position to start the search. |
ANYPUNCT(String
<,startpos>) |
Anypunct("%$#sa1",1) |
1 |
ANYSPACE |
Searches for the first
occurrence of an space(whitespace,tab etc.) in a string.
Second argument gives the position to start the search. |
ANYSPACE(String
<,startpos>) |
Anyspace("%$ #sa1",1) |
3 |
ANYUPPER |
Searches for the first
occurrence of a uppercase character in a string.
Second argument gives the position to start the search. |
ANYUPPER(String
<,startpos>) |
Anyupper("%$#sa1",1) |
0 |
CAT |
Concatenates two or more
character strings. |
CAT(str1,str2<,str3>...) |
CAT("ABC ","B
CD"," DEF") |
ABC B CD DEF |
CATS |
Concatenates two or more
character strings and removes leading and trailing blanks. |
CATS(str1,str2<,str3>...) |
CATS("ABC ","B
CD"," DEF") |
ABCB CDDEF |
CATT |
Concatenates two or more
character strings and removes only trailing blanks blanks. |
CATT(str1,str2<,str3>...) |
CATT("ABC ","B
CD"," DEF") |
ABCB CD DEF |
CATX |
Concatenates two or more
character strings. Removes leading and trailing blanks and inserts a
charatcter between strings |
CATX(sepaerator,str1,str2<,str3>...) |
CATX("-","ABC
","B CD"," DEF") |
ABC-B CD-DEF |
CHAR |
Extracts a character froma
string from the position given |
CHAR(string,position) |
CHAR("HELLO",4) |
L |
CHOOSEC |
Select n numbered string from
the list of strings. Based on the location passed as an argument. |
CHOOSEC(n,str1,str2,str3) |
CHOOSEC(2,"vineet","Naveen","Vybhav") |
Naveen |
CHOOSEN |
Select nth number from the list
of numbers based on the location passed as an argument. |
CHOOSEN(n,str1,str2,str3) |
CHOOSEN(2,2,7,6) |
7 |
COALESCEC |
Returns first non-missing value
from a list of character values |
COALESCEC(char1,char2,char3) |
COALESCEC("
","B","c" ) |
B |
COMPBL |
Compresses two or more spaces
into one. |
COMPBL(string) |
COMPBL("leo
frank murthy") |
leo frank murthy |
COMPRESS |
Compresses the characters
specified as second arguments from the string passed as first argument |
COMPRESS(char_valu,'compress
list') |
COMPRESS("anandsingh",'as') |
nndingh |
COUNT |
To count the number of times a
given substring appears in a string |
COUNT(string,search string) |
COUNT("Well fell
bell","ell") |
3 |
COUNTC |
To count the number of
individual characters in a string |
COUNTC(string,search char list) |
COUNTC("Well fell
bell","ell") |
9 |
COUNTW |
To count number of words in a
character value |
COUNTW(string<,delimiters>) |
COUNTW("Well,fell
bell",",") |
2 |
FIND |
To locate a substring within a
string. We can provide start position, direction of search and can ignore
case |
FIND(character-value,
find-string <,'modifiers'><,start>) |
FIND("hi hello hi",
"hello") |
4 |
FINDC |
To locate a character within a
string. We can provide start position, direction of search and can ignore
case |
FINDC(character-value,
find-characters <,'modifiers'><,start>) |
FINDC("hi hello hi",
"e") |
5 |
FINDW |
To locate a word within a
string. We can provide delimiter, start position, direction of search and can
ignore case |
FINDW(character-value,
find-word<,delim> <,'modifiers'><,start>) |
FINDW("hi hello hi",
"hello") |
4 |