String Functions


 

function Upper(S: string): string

The Upper function returns a string containing the same text as S, but with all 7-bit ASCII characters between 'a' and 'z' converted to uppercase.

 

function Lower(S: string): string

Lower returns a string with the same text as the string passed in S, but with all letters converted to lowercase. The conversion affects only 7-bit ASCII characters between 'A' and 'Z'.

 

function Copy(S: string; Index, Count: Integer): string

The Copy function returns a substring of a string. S is a string-type expression. Index and Count are integer-type expressions. Copy returns a string containing Count characters starting at S[Index]. If Index is larger than the length of S, Copy returns an empty string. If Count specifies more characters than are available, the only the characters from S[Index] to the end of S are returned.

 

function Pos(Substr: string; S: string): Integer

Pos searches for a substring, Substr, in a string, S. Substr and S are string-type expressions. Pos searches for Substr within S and returns an integer value that is the index of the first character of Substr within S. Pos ignores case-insensitive matches. If Substr is not found, Pos returns zero.

 

function Length(S: string): Integer

The Length function returns the number of characters actually used in the string S.

 

function Trim(S: string): Integer

The Trim function returns the string with any leading and trailing spaces and control characters removed.

 

function LTrim(S: string): Integer

The LTrim function returns the string with any leading spaces and control characters removed.

 

function RTrim(S: string): Integer

The RTrim function returns the string with any trailing spaces and control characters removed.