1 | static bool containsAtLeastNSpaces(S s, int n) {
|
2 | if (n <= 0) true; |
3 | int l = l(s); |
4 | for i to l: |
5 | if (isSpace(s.charAt(i)) && --n == 0) |
6 | true; |
7 | false; |
8 | } |
Began life as a copy of #1013468
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: | #1013469 |
| Snippet name: | containsAtLeastNSpaces |
| Eternal ID of this version: | #1013469/2 |
| Text MD5: | 1da7a3b1c82e113f26ffed5cd386cd77 |
| Author: | stefan |
| Category: | javax |
| Type: | JavaX fragment (include) |
| Public (visible to everyone): | Yes |
| Archived (hidden from active list): | No |
| Created/modified: | 2018-01-07 13:43:17 |
| Source code size: | 170 bytes / 8 lines |
| Pitched / IR pitched: | No / No |
| Views / Downloads: | 649 / 698 |
| Version history: | 1 change(s) |
| Referenced in: | [show references] |