v/vlib/builtin/utf8_test.v

7 lines
133 B
V

fn test_utf8_char_len() {
assert utf8_char_len(`a`) == 1
println(utf8_char_len(`a`))
s := 'п'
assert utf8_char_len(s[0]) == 2
}