static int countAsteriskTokens(LS tok) { int count = 0, n = l(tok); for (int i = 1; i < n; i += 2) if (eq(tok.get(i), "*")) ++count; ret count; } static int countAsteriskTokens(S s) { ret countOccurrences("*", javaTokC(s)); }
download show line numbers debug dex old transpilations
Travelled to 7 computer(s): bhatertpkbcr, mqqgnosmbjvj, pyentgdyhuwx, pzhvpgtvlbxg, tvejysmllsmz, vouqrxazstgt, xrpafgyirdlv
No comments. add comment
Snippet ID: | #1025706 |
Snippet name: | countAsteriskTokens |
Eternal ID of this version: | #1025706/3 |
Text MD5: | edf4542fbb360d29d0a14a7db31438c8 |
Author: | stefan |
Category: | javax |
Type: | JavaX fragment (include) |
Public (visible to everyone): | Yes |
Archived (hidden from active list): | No |
Created/modified: | 2020-03-23 15:42:01 |
Source code size: | 254 bytes / 11 lines |
Pitched / IR pitched: | No / No |
Views / Downloads: | 205 / 257 |
Version history: | 2 change(s) |
Referenced in: | [show references] |