MCPcopy Create free account
hub / github.com/SaschaWillems/HowToVulkan / removeUtf8Bom

Function removeUtf8Bom

source/external/tinyobj/tiny_obj_loader.h:813–822  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

811}
812
813static inline std::string removeUtf8Bom(const std::string& input) {
814 // UTF-8 BOM = 0xEF,0xBB,0xBF
815 if (input.size() >= 3 &&
816 static_cast<unsigned char>(input[0]) == 0xEF &&
817 static_cast<unsigned char>(input[1]) == 0xBB &&
818 static_cast<unsigned char>(input[2]) == 0xBF) {
819 return input.substr(3); // Skip BOM
820 }
821 return input;
822}
823
824struct warning_context {
825 std::string *warn;

Callers 2

LoadMtlFunction · 0.85
LoadObjFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected