1 | static S lastTwoDigits(S s) { |
2 | new StringBuilder buf; |
3 | for (char c : reversedCharacters(s)) |
4 | if (isDigit(c)) { |
5 | buf.append(c); |
6 | if (l(buf) >= 2) break; |
7 | } |
8 | ret reversed(str(buf)); |
9 | } |
Began life as a copy of #1013221
download show line numbers debug dex old transpilations
Travelled to 13 computer(s): aoiabmzegqzx, bhatertpkbcr, cbybwowwnfue, cfunsshuasjs, gwrvuhgaqvyk, ishqpsrjomds, lpdgvwnxivlt, mqqgnosmbjvj, pyentgdyhuwx, pzhvpgtvlbxg, tslmcundralx, tvejysmllsmz, vouqrxazstgt
No comments. add comment
Snippet ID: | #1013222 |
Snippet name: | lastTwoDigits |
Eternal ID of this version: | #1013222/2 |
Text MD5: | dad7349e8e089478f5486c73b2497f50 |
Author: | stefan |
Category: | javax |
Type: | JavaX fragment (include) |
Public (visible to everyone): | Yes |
Archived (hidden from active list): | No |
Created/modified: | 2017-12-28 22:48:36 |
Source code size: | 208 bytes / 9 lines |
Pitched / IR pitched: | No / No |
Views / Downloads: | 430 / 445 |
Version history: | 1 change(s) |
Referenced in: | [show references] |