mirror of
https://github.com/vlang/v.git
synced 2023-08-10 21:13:21 +03:00
utf8: remove unused UTF8_CHAR_LEN macro and add a simple utf8 test
This commit is contained in:
5
vlib/builtin/utf8_test.v
Normal file
5
vlib/builtin/utf8_test.v
Normal file
@ -0,0 +1,5 @@
|
||||
fn test_utf8_char_len() {
|
||||
assert utf8_char_len(`a`) == 1
|
||||
s := 'п'
|
||||
assert utf8_char_len(s[0]) == 2
|
||||
}
|
Reference in New Issue
Block a user