MCPcopy Create free account
hub / github.com/dds-bridge/dds / strip_quotes

Function strip_quotes

library/tests/parse.cpp:599–615  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

597
598
599bool strip_quotes(
600 const string& st,
601 char * cstr,
602 const string& errtag)
603{
604 // Could just be past the last one.
605 if (st.size() == 0)
606 return false;
607
608 if (st.front() != '\"' || st.back() != '\"')
609 {
610 cout << errtag << " not in quotations: '" << st << "'\n";
611 return false;
612 }
613 strcpy(cstr, st.substr(1, st.size()-2).c_str());
614 return true;
615}
616
617
618bool strip_quotes(

Callers 4

parse_PBNFunction · 0.85
parse_PARFunction · 0.85
parse_DEALERPARFunction · 0.85
parse_PLAYFunction · 0.85

Calls 1

str2intFunction · 0.85

Tested by

no test coverage detected