1
0
mirror of https://github.com/vlang/v.git synced 2023-08-10 21:13:21 +03:00

encoding.utf8: remove const unicode_con_table_up_to_low table (#9672)

This commit is contained in:
penguindark
2021-04-11 09:28:19 +02:00
committed by GitHub
parent acb58d4923
commit cca06fce90
5 changed files with 957 additions and 1542 deletions

View File

@ -11,10 +11,10 @@ pub fn validate_str(str string) bool {
return validate(str.str, str.len)
}
pub fn validate(data byteptr, len int) bool {
pub fn validate(data &byte, len int) bool {
mut state := Utf8State{}
for i := 0; i < len; i++ {
s := unsafe {data[i]}
s := unsafe { data[i] }
if s == 0 {
break
}