diff options
Diffstat (limited to 'kernel/rtlil.h')
| -rw-r--r-- | kernel/rtlil.h | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/kernel/rtlil.h b/kernel/rtlil.h index 6529603eb..502969a1f 100644 --- a/kernel/rtlil.h +++ b/kernel/rtlil.h @@ -162,11 +162,7 @@ namespace RTLIL *this = id; } - const char*c_str() const { - return global_id_storage_.at(index_); - } - - operator const char*() const { + const char *c_str() const { return global_id_storage_.at(index_); } @@ -193,6 +189,10 @@ namespace RTLIL return c_str()[i]; } + char operator[](size_t i) const { + return c_str()[i]; + } + std::string substr(size_t pos = 0, size_t len = std::string::npos) const { if (len == std::string::npos || len >= strlen(c_str() + pos)) return std::string(c_str() + pos); |
