diff options
author | Eddie Hung <eddie@fpgeh.com> | 2019-06-14 12:46:52 -0700 |
---|---|---|
committer | Eddie Hung <eddie@fpgeh.com> | 2019-06-14 12:46:52 -0700 |
commit | 691e145cda416787fe214b5533c6ac3c8047bb65 (patch) | |
tree | ac78e40defe12c75bcc040f973217ad6875bf5af /kernel | |
parent | 7eec64a38fb9362a43916aec79c7fca04b6ba72c (diff) | |
parent | 8fa74287a71fc3527cf48c7fb2c4a635ee832b72 (diff) | |
download | yosys-691e145cda416787fe214b5533c6ac3c8047bb65.tar.gz yosys-691e145cda416787fe214b5533c6ac3c8047bb65.tar.bz2 yosys-691e145cda416787fe214b5533c6ac3c8047bb65.zip |
Merge branch 'xaig' into xc7mux
Diffstat (limited to 'kernel')
-rw-r--r-- | kernel/rtlil.h | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/kernel/rtlil.h b/kernel/rtlil.h index d3ad57d72..f4fcf5dcf 100644 --- a/kernel/rtlil.h +++ b/kernel/rtlil.h @@ -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; |