1. trim



[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

new topic     » topic index » view message » categorize

2. Re: trim

useless said...



[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" 
new topic     » goto parent     » topic index » view message » categorize

Search



Quick Links

User menu

Not signed in.

Misc Menu