| 1 | module utf8 |
| 2 | |
| 3 | import encoding.utf8.validate as impl |
| 4 | |
| 5 | // validate_str reports if str consists of valid UTF-8 runes |
| 6 | pub fn validate_str(str string) bool { |
| 7 | return impl.utf8_string(str) |
| 8 | } |
| 9 | |
| 10 | // validate reports if data consists of valid UTF-8 runes |
| 11 | pub fn validate(data &u8, len int) bool { |
| 12 | return impl.utf8_data(data, len) |
| 13 | } |
| 14 |