Xbasic
COMMA_TO_CRLF2 Function
Syntax
CR-LF_List as C = Comma_to_Crlf2(C Source)
Arguments
- CR-LF_List
A list of items, each separated by CR-LF codes.
- Source
A comma-delimited list. Commas within double-quoted substrings are treated as literal characters and do not create new list items.
Description
Converts a comma-delimited list to a CR-LF-delimited list, ignoring commas that occur inside double-quoted substrings.
Discussion
The COMMA_TO_CRLF2() function behaves like COMMA_TO_CRLF() but honors quoted text: commas that appear inside double quotes are preserved and do not act as separators.
Example
' Example: quoted commas are preserved dim txt as c txt = "a,""alpha,beta"",c" ? comma_to_crlf2(txt) = a alpha,beta c
See Also