mirror of
https://github.com/YosysHQ/yosys
synced 2025-04-23 17:15:33 +00:00
Further cleanup based on @daveshah1
This commit is contained in:
parent
97d2656375
commit
a48b5bfaa5
4 changed files with 47 additions and 47 deletions
|
@ -276,6 +276,12 @@ namespace RTLIL
|
|||
return std::string(c_str() + pos, len);
|
||||
}
|
||||
|
||||
bool begins_with(const char* prefix) const {
|
||||
size_t len = strlen(prefix);
|
||||
if (size() < len) return false;
|
||||
return substr(0, len) == prefix;
|
||||
}
|
||||
|
||||
bool ends_with(const char* suffix) const {
|
||||
size_t len = strlen(suffix);
|
||||
if (size() < len) return false;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue