Skip to content

Asmod4n/mruby-string-is-utf8

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

mruby-string-is-utf8

Checks if a string is valid utf8

Ruby Example

"hallo".is_utf8? # returns true or false

"hallo".is_utf8_raw # returns 0 if true or the position where a offending char is found

C Example

#include <mruby/string_is_utf8.h>
mrb_value str = mrb_str_new_lit(mrb, "hallo");

mrb_str_is_utf8(str); // returns TRUE or FALSE

mrb_str_is_utf8_raw(str); // returns 0 if true or the position where a offending char is found

About

Checks if a string is valid utf8

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published