mirror of
https://github.com/vlang/v.git
synced 2023-08-10 21:13:21 +03:00
docs: document more builtin
functions/methods (#14229)
This commit is contained in:

committed by
GitHub

parent
dcdfdf4dd8
commit
a2338dbb7c
@ -7,10 +7,12 @@ mut:
|
||||
failed bool
|
||||
}
|
||||
|
||||
// validate_str reports if str consists of valid UTF-8 runes
|
||||
pub fn validate_str(str string) bool {
|
||||
return validate(str.str, str.len)
|
||||
}
|
||||
|
||||
// validate reports if data consists of valid UTF-8 runes
|
||||
pub fn validate(data &u8, len int) bool {
|
||||
mut state := Utf8State{}
|
||||
for i := 0; i < len; i++ {
|
||||
|
Reference in New Issue
Block a user