| 96 | } |
| 97 | |
| 98 | int HexWidget::indexPrevNotOf(const QByteArray &ba) { |
| 99 | int res = -1; |
| 100 | QByteArray buffer{m_data.mid(0, m_cursorOffset / 2 - 1)}; |
| 101 | std::size_t found = buffer.toStdString().find_last_not_of(ba.toStdString()); |
| 102 | if (found != std::string::npos) { |
| 103 | setOffset(res = static_cast<int>(found)); |
| 104 | } |
| 105 | return res; |
| 106 | } |
| 107 | |
| 108 | int HexWidget::indexOf(const QByteArray &ba) { |
| 109 | int res = m_data.indexOf(ba, m_cursorOffset / 2 + 1); |