Libraryless. Click here for Pure Java version (3417L/20K).
sS tok_packageName(LS tok) { int i = jfind(tok, "package"); if (i < 0) ret ""; i += 2; int j = jfind(tok, i, ";"); if (j < 0) ret ""; ret join(codeTokensOnly(subList(tok, i-1, j))); } sS tok_packageName(S src) { Producer<S> p = javaTokC_producer(src); S t = p.next(); if (!eq(t, "package")) ret ""; new StringBuilder buf; while (!eqOneOf(t = p.next(), null, ";")) buf.append(t); ret str(buf); }
download show line numbers debug dex old transpilations
Travelled to 14 computer(s): aoiabmzegqzx, bhatertpkbcr, cbybwowwnfue, cfunsshuasjs, ddnzoavkxhuk, gwrvuhgaqvyk, ishqpsrjomds, lpdgvwnxivlt, mqqgnosmbjvj, pyentgdyhuwx, pzhvpgtvlbxg, tslmcundralx, tvejysmllsmz, vouqrxazstgt
No comments. add comment
Snippet ID: | #1005024 |
Snippet name: | tok_packageName |
Eternal ID of this version: | #1005024/2 |
Text MD5: | edac13735d6154dc5edc38bd4360770f |
Transpilation MD5: | 97c48a88e5d7f33467e06395c1e5b397 |
Author: | stefan |
Category: | javax |
Type: | JavaX fragment (include) |
Public (visible to everyone): | Yes |
Archived (hidden from active list): | No |
Created/modified: | 2021-06-04 22:48:58 |
Source code size: | 440 bytes / 18 lines |
Pitched / IR pitched: | No / No |
Views / Downloads: | 566 / 925 |
Version history: | 1 change(s) |
Referenced in: | #1006654 - Standard functions list 2 (LIVE, continuation of #761) #1031315 - tok_packageName (old version) |