1
0
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:
Alexander Medvednikov
2019-07-10 09:07:04 +02:00
parent 68228f9977
commit e1ddac1590
3 changed files with 7 additions and 3 deletions

5
vlib/builtin/utf8_test.v Normal file
View File

@ -0,0 +1,5 @@
fn test_utf8_char_len() {
assert utf8_char_len(`a`) == 1
s := 'п'
assert utf8_char_len(s[0]) == 2
}