simpler implementation of startsWith

main
Luis Díaz Más 3 years ago committed by Luis Diaz
parent a725d22ea5
commit d1524e3d96

@ -121,7 +121,7 @@ namespace Util {
bool startsWith(const std::string& s, const std::string& start)
{
return s.size() >= start.size() && std::memcmp(s.data(), start.data(), start.size()) == 0;
return s.find(start) == 0;
}

Loading…
Cancel
Save