v/vlib/builtin/utf8_test.v

7 lines
133 B
V
Raw Normal View History

fn test_utf8_char_len() {
2020-03-26 17:14:24 +01:00
assert utf8_char_len(`a`) == 1
println(utf8_char_len(`a`))
s := 'п'
assert utf8_char_len(s[0]) == 2
}