[2] |
|
|||
Returns | strS / strD / <err> | |||
dlm | String delimiter. Default value: <return> (13) | |||
Description |
Joins the properties of a PropList to a string
The type and the codepage of the return string depend on strX's. E.g., if strX is DDS, the result will be a DDS. |
|||
Examples |
put _s().joinProps([#a:#aa, #b:#bb]) --default value (return) will be used as delimiter
-- #a #b put _s().joinProps([#a:#aa, #b:#bb], ",") --"," will be used as delimiter -- #a,#b |
|||
Notes | If dlm is followed by an integer value, the two values are treated as a string/CP pair. |
[3] |
|
|||
Returns | list / propList / <err> | |||
propDlm | String propDelimiter. | |||
dlm | String delimiter. Default value: <return> (13) | |||
Description |
Splits a string to a list or propList.
If both propDlm and valDlm are used, a propList will be returned. If neither is used, <return> will be used as valDlm. The string list entire's type and CP depend on strX's type and CP. |
|||
Examples |
jStr = _s().join([#a:"A", #b:"B"], "*", "<>")
put jStr -- #a*A<>#b*B put jStr.split() -- [#a*A<>#b*B] put jStr.split("*") -- [#a, A<>#b, B] put jStr.split("*", "<>")--this command will reconstruct the original list. -- [#a: A, #b: B] --note that the result list's properties are strings, not symbols. put jStr.splitDir("*", "<>") --split to director strings. -- ["#a": "A", "#b": "B"] |
|||
Notes | If dlm is followed by an integer value, the two values are treated as a string/CP pair. |