Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 4 additions & 8 deletions include/mruby/internal.h
Original file line number Diff line number Diff line change
Expand Up @@ -183,14 +183,10 @@ mrb_int mrb_str_char_len(mrb_state *mrb, mrb_value str);
mrb_int mrb_str_char_to_byte(mrb_state *mrb, mrb_value str, mrb_int off, mrb_int nchars);
mrb_int mrb_str_byte_to_char(mrb_state *mrb, mrb_value str, mrb_int bi);

/* Whether a string's bytes read as the encoding it is taken to have. A binary
string claims no encoding and is valid whatever its bytes are; any other
string is walked, and one that turns out to hold a byte standing for no
character is not valid. The single-byte flag is not read on the way in, so
the answer does not depend on whether the string has been measured before;
a string found to have one byte per character is marked on the way out. On
non-UTF-8 builds a string is bytes with no encoding to disagree with, and
this is always TRUE. */
/* Whether a string's bytes read as the encoding it is taken to have: FALSE for
one holding a byte that stands for no character, TRUE for a binary string
whatever its bytes are, and TRUE throughout on a non-UTF-8 build. See the
definition in string.c for what it reads and what it leaves behind. */
mrb_bool mrb_str_valid_encoding_p(mrb_state *mrb, mrb_value str);

mrb_int mrb_utf8_to_buf(char *buf, uint32_t cp);
Expand Down
Loading