mirror of
https://github.com/verilator/verilator.git
synced 2026-10-06 18:13:50 +02:00
Internals: Add VString::startsWith predicate function
This commit is contained in:
@@ -174,6 +174,10 @@ string VString::replaceWord(const string& str, const string& from, const string&
|
||||
return result;
|
||||
}
|
||||
|
||||
bool VString::startsWith(const string& str, const string& prefix) {
|
||||
return str.rfind(prefix, 0) == 0; // Faster than .find(_) == 0
|
||||
}
|
||||
|
||||
//######################################################################
|
||||
// VHashSha256
|
||||
|
||||
|
||||
Reference in New Issue
Block a user