Re: Find what?

new topic     » goto parent     » topic index » view thread      » older message » newer message

Thomas/Liona Kerslake/paulk wrote:

> Euphoria find()'s "e" in "beet", there are 2.
> What happens then? Does Euphoria give you the
> placement of the first "e"?

Yes. You can do something like this untested code to gather a list of all
indexes:

   function gather( object o, sequence s )
      sequence list
      list = {}
      for i = 1 to length( s ) do
         if equal( o, s[i] ) then
            list &= i
         end if
      end for
      return list
   end function

-- David Cuny

new topic     » goto parent     » topic index » view thread      » older message » newer message

Search



Quick Links

User menu

Not signed in.

Misc Menu