Delphi syntax:
function ExtractStrings(Separators, WhiteSpace: TSysCharSet; Content: PChar; Strings: TStrings): Integer;
C++ syntax:
extern PACKAGE int __fastcall ExtractStrings(TSysCharSet Separators, TSysCharSet WhiteSpace, char * Content, TStrings Strings);
Description
Use ExtractStrings to fill a string list with the substrings of the null-terminated string specified by Content.
Separators is a set of characters that are used as delimiters, separating the substrings. Carriage returns, newline characters, and quote characters (single or double) are always treated as separators. Separators are ignored when inside a quoted string until the final end quote. (Note that quoted characters can appear in a quoted string if the quote character is doubled.)
WhiteSpace is a set of characters to be ignored when parsing Content if they occur at the beginning of a string.

本文介绍了C++Builder中的ExtractStrings函数,用于将字符串按指定分隔符分解成子串。分隔符、空白字符集、源字符串和目标字符串列表是其主要参数。函数不会添加空字符串,并且在解析时会忽略特定的空白字符。通过示例代码展示了如何使用该函数来分割并获取字符串列表。

484

被折叠的 条评论
为什么被折叠?



