simpler implementation of startsWith
This commit is contained in:
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…
Reference in New Issue
Block a user