Error in manual for 'split' command
- Posted by CraigWelch May 27, 2017
- 1349 views
The manual entry for the 'split' command seems to have parameter 4 described as out by one.
Paramater 4 for this command says "limit : an integer (default is 0). The maximum number of sub-sequences to create. If zero, there is no limit."
The example given is:
result = split("John,Middle,Doe", ",",, 2) -- Only want 2 sub-sequences. -- result is {"John", "Middle,Doe"}
That example actually gives:
-- result is {"John", "Middle", "Doe"}
To get the desired result we would need to code:
result = split("John,Middle,Doe", ",",, 1) -- result is { "John", "Middle,Doe"}