Converts a quoted string into an unquoted string.
function AnsiExtractQuotedStr(var Src: PChar; Quote: Char): string;
AnsiString AnsiExtractQuotedStr(const char * Src, Char Quote);
SysUtils
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.
Copyright(C) 2008 CodeGear(TM). All Rights Reserved.
|
What do you think about this topic? Send feedback!
|