TurboDB Engine Documentation TurboPL String Operators and Functions |
Previous Top Next |
These string operators and functions can be used in TurboPL expressions. They are no more recommended for TurboSQL.
Operators
+ |
concatenation, e.g. EMPLOYEES.FirstName + ' ' + EMPLOYEES.LastName |
[] |
access to single character, e.g. EMPLOYEES.FirstName[1] + '. ' + EMPLOYEES.LastName |
Comparisons
< |
less |
<= |
less or equal |
= |
equal |
>= |
greater or equal |
> |
greater |
less |
less |
equal |
equal |
greater |
greater |
<> |
not equal |
has |
case sensitive search of string within another, e.g. 'John Smith' has 'Sm' |
like |
case insensitive correspondence to mask containing jokers, e.g. 'Smith' like 'sMIth', 'Smith' like 'Sm*', 'Smith' like 'Smit?' (all true) |
in [..] |
tests, whether an element is contained within the set |
Functions
Arguments in brackets are optional.
Asc(C: String): Integer |
Returns the ordinal value of the first character in the string. |
Chr(N: Integer): String |
Returns the character for a specified Unicode value. |
Exchange(Source, From, To: String): String |
Replaces all occurrences of From in Source by To and returns the modified string. |
FillStr(Source, Filler: String; Len: Integer): String |
Fills the Source with the Filler up to the given Length and returns the result. |
LeftStr(Source: String; Len: Integer): String |
Return the left substring of source with given length. |
Length(Source: String) |
Return the count of characters in Source. |
Lower(Source: String): String |
Returns the string in lowercase. |
LTrim(Source: String): String |
Returns Source without any leading white-space. |
MemoStr(Memo: MemoField [; Len: Integer]): String |
Returns the first Len (default is 255, -1 means all) characters of the content of the memo field in the current record. |
NTimes(Source: String; Count: Integer): String |
Returns a string that repeats Source Count times. |
RealVal(Str: String): Real |
Calculates the numeric value of a string expression. |
Pos(SubStr, Source: String): Integer |
Returns the position of SubStr in Source or 0, if SubStr is not contained in Source. |
RightStr(Source: String; Len: Integer) |
Returns the Len last characters of Source. |
RTrim(Source: String): String |
Returns Source without any trailing white-spaces. |
Scan(SubStr, Source: String): Integer |
Returns the number of occurrences of SubStr in Str. |
Str(Num: Real[; Width, Scale: Integer]): String |
Returns the alphanumeric representation of Num with given Width and Scale. Width=1 means as needed. The alphanumeric representation of an enumeration value (see column data types) is the name of the value. |
Upper(Source: String): String |
Returns the string in uppercase. |
NewGuid: String |
Returns a string denoting a new Globally Unique Identifier. |
Compatibility Information
TurboPL is supported only for backward compatibility in tables up to level 4.