Returns the index within this string of the last occurrence of the specified character. That is, the index returned is the largest value such that: this.charAt( ) == ch is true. The String is searched backwards starting at the last character.
(int ch)
| 466 | * ) == ch is true. The String is searched backwards starting at the last character. |
| 467 | */ |
| 468 | public int lastIndexOf(int ch){ |
| 469 | for(int iter = count + offset - 1 ; iter >= offset ; iter--) { |
| 470 | if(value[iter] == ch) { |
| 471 | return iter - offset; |
| 472 | } |
| 473 | } |
| 474 | return -1; |
| 475 | } |
| 476 | |
| 477 | /** |
| 478 | * Returns the index within this string of the last occurrence of the specified character, searching backward starting at the specified index. That is, the index returned is the largest value |