Not logged in.  Login/Logout/Register | List snippets | | Create snippet | Upload image | Upload data

10
LINES

< > BotCompany Repo | #1003837 // tok_importsClassNamed

JavaX fragment (include)

static bool tok_importsClassNamed(L<S> tok, S className) {
  for (int i = 1; i < l(tok); i += 2)
    if (eq(tok.get(i), "import")) {
      int j = findEndOfStatement(tok, i); // index of ;+1
      if (eq(get(tok, j-3), className))
        ret true;
      i = j-1;
    }
  ret false;
}

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: #1003837
Snippet name: tok_importsClassNamed
Eternal ID of this version: #1003837/1
Text MD5: 68aab5f6a4f0fe1725d74833ce6965f5
Author: stefan
Category:
Type: JavaX fragment (include)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2016-08-07 13:39:04
Source code size: 293 bytes / 10 lines
Pitched / IR pitched: No / No
Views / Downloads: 564 / 626
Referenced in: #1004092 - tok_importedClassNames (just the names, not the packages)