MCPcopy Create free account
hub / github.com/CppCXY/EmmyLuaCodeStyle / skip_bom

Function skip_bom

3rd/nlohmann_json/single_include/nlohmann/json.hpp:8106–8118  ·  view source on GitHub ↗

! @brief skip the UTF-8 byte order mark @return true iff there is no BOM or the correct BOM has been skipped */

Source from the content-addressed store, hash-verified

8104 @return true iff there is no BOM or the correct BOM has been skipped
8105 */
8106 bool skip_bom()
8107 {
8108 if (get() == 0xEF)
8109 {
8110 // check if we completely parse the BOM
8111 return get() == 0xBB && get() == 0xBF;
8112 }
8113
8114 // the first character is not the beginning of the BOM; unget it to
8115 // process is later
8116 unget();
8117 return true;
8118 }
8119
8120 void skip_whitespace()
8121 {

Callers 1

scanFunction · 0.70

Calls 2

getFunction · 0.70
ungetFunction · 0.70

Tested by

no test coverage detected