| 85 | } |
| 86 | |
| 87 | int HexWidget::indexPrevOf(const QByteArray &ba) { |
| 88 | int res = m_data.mid(0, m_cursorOffset / 2).lastIndexOf(ba); |
| 89 | if (res >= 0) { |
| 90 | m_selectStart = res; |
| 91 | m_selectLen = ba.size(); |
| 92 | m_selectEnd = m_selectStart + m_selectLen - 1; |
| 93 | setCursorOffset(res * 2, false); |
| 94 | } |
| 95 | return res; |
| 96 | } |
| 97 | |
| 98 | int HexWidget::indexPrevNotOf(const QByteArray &ba) { |
| 99 | int res = -1; |