MCPcopy Create free account
hub / github.com/BehaviorTree/BehaviorTree.CPP / skip_bom

Function skip_bom

include/behaviortree_cpp/contrib/json.hpp:8858–8870  ·  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

8856 @return true iff there is no BOM or the correct BOM has been skipped
8857 */
8858 bool skip_bom()
8859 {
8860 if (get() == 0xEF)
8861 {
8862 // check if we completely parse the BOM
8863 return get() == 0xBB && get() == 0xBF;
8864 }
8865
8866 // the first character is not the beginning of the BOM; unget it to
8867 // process is later
8868 unget();
8869 return true;
8870 }
8871
8872 void skip_whitespace()
8873 {

Callers 1

scanFunction · 0.85

Calls 2

ungetFunction · 0.85
getFunction · 0.70

Tested by

no test coverage detected