asaskevich / govalidator

[Go] Package of validators and sanitizers for strings, numerics, slices and structs
MIT License
6.05k stars 555 forks source link

Count grapheme clusters #157

Open bejayoharen opened 8 years ago

bejayoharen commented 8 years ago

Not sure if this is in the scope of the project, but it would be useful to have an accurate way to count grapheme clusters, and I don't know another way to do this in Go.

http://stackoverflow.com/questions/36928185/counting-characters-in-golang-string http://unicode.org/reports/tr29/#Grapheme_Cluster_Boundaries

(The reason I thought this might be in-scope, is I thought it would be useful in validating strings as too long or two short.)

sergeyglazyrindev commented 3 years ago

Hello guys! I forked this package cause owner disappeared. Hope, he will be back, but it would be easier to merge these changes back if he is back Link to my repo: create issue there and we'll discuss it.