RAD Studio VCL Reference
ContentsIndex
PreviousUpNext
SysUtils.LastDelimiter Function

Returns the byte index of the last character that matches any character in a specified set of delimiters.

Pascal
function LastDelimiter(const Delimiters: string; const S: string): Integer;
C++
int LastDelimiter(const AnsiString Delimiters, const AnsiString S);

SysUtils

Call LastDelimiter to locate the last delimiter in a specified string. 

Delimiters is a string where each character is a valid delimiter. 

S is the string to search for delimiters. 

For example, the line 

MyIndex := LastDelimiter('\.:','c:\filename.ext'); // Delphi 

MyIndex = LastDelimiter("\\.:","c:\\filename.ext"); // C++ 

sets MyIndex to 12. 

When working with multi-byte character sets (MBCS), S may contain double byte characters, but the delimiters listed in the Delimiters parameter must all be single byte non-null characters. 

 

Copyright(C) 2008 CodeGear(TM). All Rights Reserved.
What do you think about this topic? Send feedback!