Built In Operators:
The following is a list of all built in operators available in string expressions. All operator names are case insensitive, though actual strings are case sensitive.
All operators that use or return numeric values are 1 based (1 is the first item).
Left(text, num) |
This function takes two parameters. The first is a string, the second is the number of characters to return. The first "num" characters are returned. |
Left("abcdef",3) = "abc" |
Mid(text, start, [length]) |
This function takes three parameters. The first is a string. The second is the first character to return. The third (optional) parameter is the number of characters to return, by default 1024. |
Mid("abcdef",3,2) = "cd" Mid("abcdef",3) = "cdef" |
switch_delimited |
This function returns a subset of text given: the index of the subset; a string of text values; and a string representing the delimiter that defines how the text array is parsed. |
switch_delimited(2, "zero|one|two|three", "|") = "two" |
Switch(index,text1,[text2],[text3],[]) |
This function takes 2 or more parameters. The first is an integer 0-based index of which of the other parameters to return. The second and subsequent parameters must all be strings. The "index" parameter is returned. |
Switch(1,"one","two","three") = "two" |
Upper(text)
|
Convert the string in "text" to upper case. |
Upper("abcdef") = "ABCDEF" |
Lower(text):
|
Convert the string in "text" to lower case.
|
lower("aBcDeF") = "abcdef"
|
Title(text) or Proper(text) |
Convert the string in "text" to title case. |
Title("make this look like a title") = "Make This Look Like A Title" Proper("FIX the CaPiTaliZaTIon HEre") = "Fix The Capitalization Here" |
Len(text) |
Returns the number of characters in a string |
|
Right(text,number_of_chars) |
Return the right-most characters in text |
right("c:/ctech/mydata.apdv",4) = ".apdv" |
NL() or CR() |
Add a newline character |
"Line 1" + NL() + "Line 2" = Line 1 Line 2 |
QUOTE() |
Add a double quotation mark character |
"One " + QUOTE() +"Two" + QUOTE() + " Three" = "One "Two" Three" |
APOSTROPHE() |
Add an apostrophe character |
"The analyte" + APOSTROPHE() + "s concentration" = "The analyte’s concentration" |
TAB() |
Will insert a tab in the text |
"30" + TAB() + "ppm" = "30 ppm" |
Pos(text,search_text) |
Return the integer position of first occurrence of substring in text |
Pos("c:\ctech\mydata.apdv","\") = 3 |
RPos(text,search_text) |
Return the integer position of last occurrence of substring in text (searches backwards) |
Pos("c:\ctech\mydata.apdv","\") = 9 |
© 1994-2018 ctech.com