Re: question about find function

new topic     » goto parent     » topic index » view thread      » older message » newer message
ghaberek said...

Yes, you're looking for match() not find(). There is a fundamental difference in how these work.

The find() function locates an item in a sequence, and with strings each character is an atom that is an item in the sequence, so you're looking for atoms.

...

The match() function locates a matching subset of a sequence, and so with strings you're looking a partial string match in a larger string.

...

P.S. I agree the documentation needs work. I've asked for help contributing updates and corrections to the documentation. Anyone who wants to offer corrections is free to submit pull requests on GitHub: https://github.com/OpenEuphoria/euphoria/pulls.

-Greg

Years ago, i wrote my own routines, that work as i expect them to. I am not here to work for and fit into the language, but vice versa.

It's strange to see you use the word "strings", it was such a dirty word that began many flame wars on the old forum. Perhaps now match() can be aliased to strfind() ? Well, maybe not, that will find only sub-matches, not equivalences. Must be a reason somewhere....

Github doesn't work for me on windoze. I am not going to install *nix and spend a weekend downloading and debugging *nix packages so i can use yet another google product (github). Making the acquisition of OE more difficult doesn't help. Have you noticed how many $millions Julia has raked in in the 10 years it's been in existance?

Kat

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

Search



Quick Links

User menu

Not signed in.

Misc Menu