1. Error in manual for 'split' command
- Posted by CraigWelch May 27, 2017
- 1351 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"}
2. Re: Error in manual for 'split' command
- Posted by petelomax May 27, 2017
- 1342 views
Yikes:
eu40 said...
public function split(sequence st, object delim=' ', integer limit=0, integer no_empty = 0)
eu41 said...
public function split(sequence st, object delim=' ', integer no_empty = 0, integer limit=0)
Whappen there?
Pete
3. Re: Error in manual for 'split' command
- Posted by jimcbrown (admin) May 28, 2017
- 1335 views
petelomax said...
Yikes:
eu40 said...
public function split(sequence st, object delim=' ', integer limit=0, integer no_empty = 0)
eu41 said...
public function split(sequence st, object delim=' ', integer no_empty = 0, integer limit=0)
Whappen there?
Pete
http://scm.openeuphoria.org/hg/euphoria/rev/c3394915cf89
Where did you get your eu40 version from? That's old. This was changed before the first release candidate (4.0.0rc1) was put out in Nov 2010 and all official non-beta releases of 4.0 have the "eu41" version.