MCPcopy Create free account
hub / github.com/LAStools/LAStools / GetTokenNext

Function GetTokenNext

LASzip/src/mydefs.cpp:712–722  ·  view source on GitHub ↗

Get next token till end of input

Source from the content-addressed store, hash-verified

710/// <param name="out"></param>
711/// <returns></returns>
712bool GetTokenNext(std::string& in, std::string delim, std::string& out) {
713 size_t pos = in.find(delim);
714 if (pos != std::string::npos) {
715 out = in.substr(0, pos);
716 in = in.substr(pos + delim.length(), in.length());
717 } else {
718 out = in;
719 in = "";
720 }
721 return !(in.empty() && out.empty());
722}
723
724/// returns next token, "" if done or first empty token
725std::string TokenNext(std::string& in, std::string delim) {

Callers 2

ValueSubStrMethod · 0.85
TokenNextFunction · 0.85

Calls 1

emptyMethod · 0.80

Tested by

no test coverage detected