Previous Topic: Lookup FunctionsNext Topic: Telephone Number Functions


String Functions

String Concatenation

Function Name Example

Parameters Results

+operator

str1 - string

str2 - string

FirstName + LastName

'John Smith'

String Concatenation

Function Name Example

Parameters Results

Concat(str1, str2, separator)

str1 - string

str2 - string

separator - string

Concat('Hello','world',', ')

'Hello, world'

Sub String

Function Name Example

Parameters Results

Substr(str,from,to)

str - the string

from - starting offset of requested substring

to - ending offset of requested substring

Substr('John Smith',5,6)

'Sm'

String Trimming

Function Name Example

Parameters Results

Trim(str)

str - string with leading/ending spaces

Trim(' sentence between many spaces           ')

'sentence between many spaces'

String Last Characters

Function Name Example

Parameters Results

LastChars(str,len)

str - string

len - integer value specifying the required length of the tail

LastChars('where is the end',7)

'the end'

String Length

Function Name Example

Parameters Results

Strlen(str)

str - string

Strlen('hello world')

11

String Searching

Function Name Example

Parameters Results

StrFind(str,substr)

str - string

substr - the string which we need offset of

StrFind('My favorite color is red','color')

12

Convert from Integer to String

Function Name Example

Parameters Results

StrOf(int)

int - integer value

StrOf(5)

'5'

Finding Digits in a String

Function Name Example

Parameters Results

DigitsOf(str)

str - string

DigitsOf('john12smith34')

'1234'

Replacing Strings

Function Name Example

Parameters Results

StrReplace(strSource,substr,replacing)

strSource - source string

substr - the substring to be replaced

replacing - the new sub-string

StrReplace('firstname1lastname1','1','2')

'firstname2lastname2'

Finding Alphabetic Characters

Function Name Example

Parameters Results

AlphaOf(str)

str - string

AlphaOf('a1!@b2#$A1%^B2')

'abAB'

Finding Alpha-Numeric Characters

Function Name Example

Parameters Results

AlphaAndDigitsOf(str)

str - string

AlphaAndDigitsOf('a1!@b2#$A1%^B2')

'a1b2A1B2'

Lower Case Conversion

Function Name Example

Parameters Results

ToLower(str)

str - string

ToLower('RRYMON')

'rrymon'

Upper Case Conversion

Function Name Example

Parameters Results

ToUpper(str)

str - string

ToUpper('rrymon')

'RRYMON'

Two-way Case Conversion

Function Name Example

Parameters Results

SwapCases(str)

str - string

SwapCases('RRymon')

'rrYMON'

Removing Vowels from a String

Function Name Example

Parameters Results

RemoveVowels(str)

str - string

RemoveVowels('johnSMITH')

'jhnSMTH'

Left-to-Right Reversing

Function Name Example

Parameters Results

Reverse(str)

str - string

Reverse('john SMITH')

'HTIMS nhoj'