Searching strings with indexOf vs countUntil

Kagamin via Digitalmars-d-learn digitalmars-d-learn at puremagic.com
Thu May 25 04:55:21 PDT 2017


I would guess indexOf returns a value suitable for indexing, 
therefore it counts code units, while countUntil counts range 
elements - code points in case of a string. Also number of code 
points is not suitable for indexing an utf8 string, it can be 
used to allocate a dstring, but not so much for anything else. 
What do you use the resulting value for?


More information about the Digitalmars-d-learn mailing list