1 | static int lastIndexOfIgnoreCase_manual(S a, S b) {
|
2 | int la = strL(a), lb = strL(b); |
3 | if (la < lb) ret -1; |
4 | int n = la-lb; |
5 | |
6 | loop: for (int i = n; i >= 0; i--) {
|
7 | for (int j = 0; j < lb; j++) {
|
8 | char c1 = a.charAt(i+j), c2 = b.charAt(j); |
9 | if (!eqic(c1, c2)) |
10 | continue loop; |
11 | } |
12 | ret i; |
13 | } |
14 | ret -1; |
15 | } |
Began life as a copy of #1013296
download show line numbers debug dex old transpilations
Travelled to 6 computer(s): bhatertpkbcr, mqqgnosmbjvj, pyentgdyhuwx, pzhvpgtvlbxg, tvejysmllsmz, vouqrxazstgt
No comments. add comment
| Snippet ID: | #1025933 |
| Snippet name: | lastIndexOfIgnoreCase_manual |
| Eternal ID of this version: | #1025933/3 |
| Text MD5: | c4ae3c30ae74f48601f1240b07535672 |
| Author: | stefan |
| Category: | javax |
| Type: | JavaX fragment (include) |
| Public (visible to everyone): | Yes |
| Archived (hidden from active list): | No |
| Created/modified: | 2019-10-30 16:15:43 |
| Source code size: | 346 bytes / 15 lines |
| Pitched / IR pitched: | No / No |
| Views / Downloads: | 462 / 504 |
| Version history: | 2 change(s) |
| Referenced in: | [show references] |