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

Function GetTokenNext

src/mydefs.cpp:716–726  ·  view source on GitHub ↗

Get next token till end of input

Source from the content-addressed store, hash-verified

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

Callers 1

TokenNextFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected