(runeIndex int)
| 410 | } |
| 411 | |
| 412 | func (m *stringByteMapper) byteIndex(runeIndex int) int { |
| 413 | i := sort.Search(len(m.runeIndexes), func(i int) bool { |
| 414 | return m.runeIndexes[i] > runeIndex |
| 415 | }) - 1 |
| 416 | if i < 0 { |
| 417 | return runeIndex |
| 418 | } |
| 419 | return runeIndex + m.deltas[i] |
| 420 | } |
| 421 | |
| 422 | // FindNextMatch returns the next match in the same input string as the match parameter. |
| 423 | // Will return nil if there is no next match or if given a nil match. |