OpenMiner  0.0.1a
Voxel game engine
Static Public Member Functions | List of all members
sol::stack::getter< char16_t > Struct Template Reference

#include <sol.hpp>

Static Public Member Functions

static char16_t get (lua_State *L, int index, record &tracking)
 

Member Function Documentation

§ get()

static char16_t sol::stack::getter< char16_t >::get ( lua_State *  L,
int  index,
record tracking 
)
inlinestatic
9769  {
9770  string_view utf8 = stack::get<string_view>(L, index, tracking);
9771  const char* strb = utf8.data();
9772  const char* stre = utf8.data() + utf8.size();
9773  char32_t cp = 0;
9774  auto dr = unicode::utf8_to_code_point(strb, stre);
9775  if (dr.error != unicode::error_code::ok) {
9777  }
9778  else {
9779  cp = dr.codepoint;
9780  }
9781  auto er = unicode::code_point_to_utf16(cp);
9782  return er.code_units[0];
9783  }
encoded_result< char16_t > code_point_to_utf16(char32_t codepoint)
Definition: sol.hpp:9038
decoded_result< It > utf8_to_code_point(It it, It last)
Definition: sol.hpp:9069
basic_string_view< char > string_view
Definition: sol.hpp:1186
static constexpr char32_t replacement
Definition: sol.hpp:8995

The documentation for this struct was generated from the following file: