greyblake/nutype

String len validation: bytes VS chars

greyblake opened this issue · 0 comments

Currently len validation is based str::len() which returns length in bytes.
It can be sometimes desired to validate length against UTF-8 chars, which shell be obtained through

let utf8_len = str_value.chars().count();