🔷 C++ - String Comparison
Updated at 2013-03-15 21:23
Does string starts with another string?
std::string s("xyzblahblah");
std::string t("xyz")
if (s.compare(0, t.length(), t) == 0)
{
// ok
}
Does string starts with another string?
std::string s("xyzblahblah");
std::string t("xyz")
if (s.compare(0, t.length(), t) == 0)
{
// ok
}