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

#include <sol.hpp>

Static Public Member Functions

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

Member Function Documentation

§ get()

static char32_t sol::stack::getter< char32_t >::get ( lua_State *  L,
int  index,
record tracking 
)
inlinestatic
9788  {
9789  string_view utf8 = stack::get<string_view>(L, index, tracking);
9790  const char* strb = utf8.data();
9791  const char* stre = utf8.data() + utf8.size();
9792  char32_t cp = 0;
9793  auto dr = unicode::utf8_to_code_point(strb, stre);
9794  if (dr.error != unicode::error_code::ok) {
9796  }
9797  else {
9798  cp = dr.codepoint;
9799  }
9800  auto er = unicode::code_point_to_utf32(cp);
9801  return er.code_units[0];
9802  }
encoded_result< char32_t > code_point_to_utf32(char32_t codepoint)
Definition: sol.hpp:9060
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: