1. trim
- Posted by useless May 29, 2009
- 1004 views
- Last edited May 30, 2009
[19:20] <CIA-16> euphoria: This returns the index of the first element not trimmed rather than actually [19:20] <CIA-16> euphoria: returning a trimmed sequence.
After the trim, the first element not trimmed would always be at index 1, no?
useless
2. Re: trim
- Posted by DerekParnell (admin) May 29, 2009
- 970 views
- Last edited May 30, 2009
[19:20] <CIA-16> euphoria: This returns the index of the first element not trimmed rather than actually [19:20] <CIA-16> euphoria: returning a trimmed sequence.
After the trim, the first element not trimmed would always be at index 1, no?
useless
No, kat. This 'index' option only applies when the optional parameter is supplied.
For example:
object t t = trim("..::This is some text::..", ":.", 1) -- t ==> {5, 21}
That is to say, the 5th element is the first leftmost element not trimmed and the 21st element is the first rightmost element not trimmed.
When using the default parameters ...
object t t = trim("..::This is some text::..", ":.") -- t ==> "This is some text"