Jonas Berlin ac2d0e1b33
impl: optimize replacen loop
The previous implementation didn't bail out of the replace
loop when the limit was reached until one more than the
total number of 'find' operations had completed. By moving
the limit check to the end of the loop body, we execute only
the number of 'find' operations that is necessary, instead of
one extra.

This optimization only applies to 'replacen' calls with a limit
not equal to '0'. That includes 'replace' but not 'replace_all'.

PR #930
2022-11-28 13:37:22 -05:00
..
2019-08-03 14:20:22 -04:00
2020-01-09 14:26:57 -05:00
2021-03-11 21:10:40 -05:00
2021-03-11 21:10:40 -05:00
2019-09-03 12:35:17 -04:00
2020-01-09 14:26:57 -05:00
2019-08-03 14:20:22 -04:00
2022-11-28 13:37:22 -05:00
2019-08-03 14:20:22 -04:00
2020-10-11 20:08:30 -04:00
2019-08-03 14:20:22 -04:00
2021-04-30 20:02:56 -04:00
2021-04-30 20:02:56 -04:00
2021-04-30 20:02:56 -04:00
2016-04-22 21:17:02 -04:00