commonLength

"Nordlöw" via Digitalmars-d-learn digitalmars-d-learn at puremagic.com
Thu Jan 15 12:36:11 PST 2015


On Thursday, 15 January 2015 at 19:30:21 UTC, Tobias Pankrath 
wrote:
> What's wrong with commonPrefix(..).length?

Ahh, sorry that works too. I'm surprised :)
DMD/Phobos has become really clever at avoiding allocation.

Seems there may be need for both

     commonPrefixCount

and

     commonPrefixLength

depending on whether string auto-decoding is needed or not.


More information about the Digitalmars-d-learn mailing list