Feature Overview
MSPLIT()
Converts a string into a table by splitting it with multiple delimiters.
- The default delimiter is " " for ease of data entry and readability(according to one's own preference).
- the default delimiters and numeric conversion flags should be modified according to your project.
- This function consumes 36 Token.
-- Split a pair of data and further split it into colors and names. local value=msplit( '10-yellow 11-green 8-red 12-blue' ,' ','-' ) for i,v in pairs(value) do local col,name=unpack(v) ?name,i*32-24,48,col end |
If you want to check the type at once, consider using a DMP().
This function is included in the KNUTIL library.
release note
[Please log in to post a comment]