On 6/2/16 5:43 PM, Timon Gehr wrote:
.̂ ̪.̂
(Copy-paste it somewhere else, I think it might not be rendered
correctly on the forum.)
The point is that if I do:
".̂ ̪.̂".normalize!NFC.byGrapheme.findAmong([Grapheme("."),Grapheme(",")])
no match is returned.
If I use your method with dchars, I will get spurious matches. I.e. the
suggested method to look for punctuation symbols is incorrect:
writeln(".̂ ̪.̂".findAmong(",.")); // ".̂ ̪.̂"
Nice example.
(Also, do you have an use case for this?)
Count delimited words. Did you also look at balancedParens?
Andrei