Last digit of the run starting at i, or i - 1 if there is none.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| character(len=*), | intent(in) | :: | src |
source text |
||
| integer, | intent(in) | :: | i |
byte where the run of digits starts |
integer function digits_end(src, i) result(j) !! Last digit of the run starting at `i`, or `i - 1` if there is none. character(len=*), intent(in) :: src !! source text integer, intent(in) :: i !! byte where the run of digits starts j = i - 1 do while (is_digit(peek(src, j + 1))) j = j + 1 end do end function digits_end