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

Function consumeTrailingGarbage

src/script_tokenizer.cpp:44–50  ·  view source on GitHub ↗

Consume trailing garbage after a malformed number token.

Source from the content-addressed store, hash-verified

42
43// Consume trailing garbage after a malformed number token.
44void consumeTrailingGarbage(const std::string& source, size_t len, size_t& i)
45{
46 while(i < len && (isIdentChar(source[i]) || source[i] == '.'))
47 {
48 ++i;
49 }
50}
51
52struct NumberResult
53{

Callers 2

scanHexNumberFunction · 0.85
scanDecimalNumberFunction · 0.85

Calls 1

isIdentCharFunction · 0.85

Tested by

no test coverage detected