libkroll/win32/string_util_icu.cpp
bool ReadUnicodeCharacter(const char* src, int32 src_len,
                          int32* char_index, uint32* code_point_out) {
  // U8_NEXT expects to be able to use -1 to signal an error, so we must
  // use a signed type for code_point.  But this function returns false
  // on error anyway, so code_point_out is unsigned.
  int32 code_point;
  U8_NEXT(src, *char_index, src_len, code_point);
  *code_point_out = static_cast<uint32>(code_point);

  // The ICU macro above moves to the next char, we want to point to the last
  // char consumed.
  (*char_index)--;

  // Validate the decoded value.
  return U_IS_UNICODE_CHAR(code_point);
}
// Reads a UTF-8 stream, placing the next code point into the given output
// |*code_point|. |src| represents the entire string to read, and |*char_index|
// is the character offset within the string to start reading at. |*char_index|
// will be updated to index the last character read, such that incrementing it
// (as in a for loop) will take the reader to the next character.
//
// Returns true on success. On false, |*code_point| will be invalid.
Reads a UTF-8 stream, placing the next code point into the given output
|*code_point|. |src| represents the entire string to read, and |*char_index|
is the character offset within the string to start reading at. |*char_index|
will be updated to index the last character read, such that incrementing it
(as in a for loop) will take the reader to the next character.

Returns true on success. On false, |*code_point| will be invalid.
Reads a UTF - 8 stream placing the next code point into the given output | * code_point| . |src| represents the entire string to read and | * char_index| is the character offset within the string to start reading at . | * char_index| will be updated to index the last character read such that incrementing it ( as in a for loop ) will take the reader to the next character . Returns true on success . On false | * code_point| will be invalid .
bool ReadUnicodeCharacter(const char* src, int32 src_len,
                          int32* char_index, uint32* code_point_out) {
  int32 code_point;
  U8_NEXT(src, *char_index, src_len, code_point);
  *code_point_out = static_cast<uint32>(code_point);
  (*char_index)--;
  return U_IS_UNICODE_CHAR(code_point);
}
bool ReadUnicodeCharacter ( const char * src , int32 src_len , int32 * char_index , uint32 * code_point_out ) { int32 code_point ; U8_NEXT ( src , * char_index , src_len , code_point ) ; * code_point_out = static_cast < uint32 > ( code_point ) ; ( * char_index ) -- ; return U_IS_UNICODE_CHAR ( code_point ) ; }
Reads a UTF-8 stream, placing the next code point into the given output
|*code_point|.
Reads a UTF - 8 stream placing the next code point into the given output | * code_point| .
// U8_NEXT expects to be able to use -1 to signal an error, so we must // use a signed type for code_point.  But this function returns false // on error anyway, so code_point_out is unsigned. // The ICU macro above moves to the next char, we want to point to the last // char consumed. // Validate the decoded value.