MCPcopy Create free account
hub / github.com/FirebirdSQL/firebird / getWord

Method getWord

src/common/classes/fb_string.h:848–868  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

846 bool operator!=(const char_type* str) const {return different(str);}
847
848 bool getWord(StringType& from, const char* sep)
849 {
850 from.alltrim(sep);
851 size_type p = from.find_first_of(sep);
852 if (p == npos)
853 {
854 if (from.isEmpty())
855 {
856 *this = "";
857 return false;
858 }
859 *this = from;
860 from = "";
861 return true;
862 }
863
864 *this = from.substr(0, p);
865 from = from.substr(p);
866 from.ltrim(sep);
867 return true;
868 }
869 };
870
871 typedef StringBase<StringComparator> string;

Callers

nothing calls this directly

Calls 5

alltrimMethod · 0.80
ltrimMethod · 0.80
find_first_ofMethod · 0.45
isEmptyMethod · 0.45
substrMethod · 0.45

Tested by

no test coverage detected