MCPcopy Create free account
hub / github.com/MyGUI/mygui / as_utf8_end

Function as_utf8_end

Tools/EditorFramework/pugixml.cpp:1647–1658  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1645}
1646
1647PUGI__FN void as_utf8_end(char* buffer, size_t size, const wchar_t* str, size_t length)
1648{
1649 // convert to utf8
1650 uint8_t* begin = reinterpret_cast<uint8_t*>(buffer);
1651 uint8_t* end = utf_decoder<utf8_writer>::decode_wchar_block(str, length, begin);
1652
1653 assert(begin + size == end);
1654 (void)!end;
1655
1656 // zero-terminate
1657 buffer[size] = 0;
1658}
1659
1660#ifndef PUGIXML_NO_STL
1661PUGI__FN std::string as_utf8_impl(const wchar_t* str, size_t length)

Callers 2

string as_utf8_implMethod · 0.70
convert_path_heapFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected