RAD Studio VCL Reference
ContentsIndex
PreviousUpNext
SysUtils.AnsiExtractQuotedStr Function

Converts a quoted string into an unquoted string.

Pascal
function AnsiExtractQuotedStr(var Src: PAnsiChar; Quote: AnsiChar): AnsiString; overload;
function AnsiExtractQuotedStr(var Src: PWidechar; Quote: WideChar): UnicodeString; overload;
C++
AnsiString AnsiExtractQuotedStr(PAnsiChar Src, AnsiChar Quote);
UnicodeString AnsiExtractQuotedStr(PWidechar Src, WideChar Quote);

AnsiExtractQuotedStr removes the quote characters from the beginning and end of a quoted string, and reduces pairs of quote characters within the string to a single quote character. The Quote parameter defines what character to use as a quote character. If the first character in Src is not the value of the Quote parameter, AnsiExtractQuotedStr returns an empty string. 

The function copies characters from Src to the result string until the second solitary quote character or the first null character in Src. The Src parameter is updated to point to the first character following the quoted string. If Src does not contain a matching end quote character, the Src parameter is updated to point to the terminating null character.

Note: This function supports multi-byte character sets (MBCS).
 

 

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