1 | static S firstTwoDigits(S s) {
|
2 | new StringBuilder buf; |
3 | for (char c : characters(s)) |
4 | if (isDigit(c)) {
|
5 | buf.append(c); |
6 | if (l(buf) >= 2) break; |
7 | } |
8 | ret str(buf); |
9 | } |
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: | #1013221 |
| Snippet name: | firstTwoDigits |
| Eternal ID of this version: | #1013221/2 |
| Text MD5: | b9c3b1d732d0ac50de268a23de72a994 |
| 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:24 |
| Source code size: | 191 bytes / 9 lines |
| Pitched / IR pitched: | No / No |
| Views / Downloads: | 615 / 643 |
| Version history: | 1 change(s) |
| Referenced in: | [show references] |