RAD Studio VCL Reference
ContentsIndex
PreviousUpNext
AnsiStrings.AnsiMidStr Function

Returns substring of specified length at specified position in string.

Pascal
function AnsiMidStr(const AText: AnsiString; const AStart: Integer; const ACount: Integer): AnsiString; overload;
C++
AnsiString AnsiMidStr(const AnsiString AText, const int AStart, const int ACount);

AnsiMidStr returns a substring ACount characters at AText[AStart]. If AStart is larger than the length of AText, AnsiMidStr returns an empty string. If Count specifies more characters than are available, only the characters from AText[AStart] to the end of AText are returned. This function supports multi-byte character strings (MBCS) AnsiStrings

 

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