Very nice code, thanks to José M.C. Quintas:
aList := hb_RegExSplit( hb_Eol(), cText )
hua wrote:However hb_atokens() only accepts a single character for the delimiter.
So can't pass CRLF to it
hb_ATokens(<cString>, [<cDelimiter>|lEOL], [<lSkipStrings>], [<lDoubleQuoteOnly>]) ➜ aTokens
returns an array filled with all individual tokens of given <cString> string, that is, all the separate sub-strings that are delimited by either <cDelimiter> or by EOL (end of line) if (instead of <cDelimiter>) <lEOL> has been passed and evaluates to .T.
If neither <cDelimiter> nor <lEOL> specified, then as delimiter is used, by default, an empty space (ASCII char 32).
HB_ATokens( <cString> , ;
[<cDelimiter>] , ;
[<lSkipQuotes>] , ;
[<lDoubleQuotesOnly>] ) --> aTokens
<cDelimiter>
A single character can be specified as delimiter used to tokenize the string <cString>. It defaults to a blank space (Chr(32)).
Return to Utilities / Utilidades
Users browsing this forum: No registered users and 19 guests