projects
/
yosys.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
| inline |
side by side
Merge remote-tracking branch 'origin/master' into xaig
[yosys.git]
/
kernel
/
rtlil.h
diff --git
a/kernel/rtlil.h
b/kernel/rtlil.h
index 8509670ff4b2580361c8cb3a01555a718a01e441..d3ad57d727bd496e1d945371a5de51e70dfc4df7 100644
(file)
--- a/
kernel/rtlil.h
+++ b/
kernel/rtlil.h
@@
-276,6
+276,12
@@
namespace RTLIL
return std::string(c_str() + pos, len);
}
+ bool ends_with(const char* suffix) const {
+ size_t len = strlen(suffix);
+ if (size() < len) return false;
+ return substr(size()-len) == suffix;
+ }
+
size_t size() const {
return str().size();
}