RAD Studio VCL Reference
ContentsIndex
PreviousUpNext
AnsiStrings.LastDelimiter Function

Byte index of rightmost whole delimiter character.

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

LastDelimiter returns the byte index in S of the rightmost whole character that matches any character in the Delimiters parameter (except null (#0)). S may contain multibyte characters. Delimiters must contain only single byte, non-null characters.  

For example, LastDelimiter('\.:', 'c:\filename.ext') returns 12

 

Copyright(C) 2009 Embarcadero Technologies, Inc. All Rights Reserved.
What do you think about this topic? Send feedback!