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

10
LINES

< > BotCompany Repo | #1034826 // addClassNameToInclude

JavaX fragment (include) [tags: use-pretranspiled]

Libraryless. Click here for Pure Java version (8173L/47K).

sS addClassNameToInclude(S snippetID, S className) {
  LS tok = javaTokSnippet(snippetID);

  if (jfind(tok, "please include class " + className) >= 0)
    ret className + " already included";
  
  tokPrepend(tok, l(tok)-1, "\nplease include class " + className + ".");
  
  ret editSnippet(snippetID, join(tok));
}

Author comment

Began life as a copy of #1034736

download  show line numbers  debug dex  old transpilations   

Travelled to 3 computer(s): bhatertpkbcr, mowyntqkapby, mqqgnosmbjvj

No comments. add comment

Snippet ID: #1034826
Snippet name: addClassNameToInclude
Eternal ID of this version: #1034826/3
Text MD5: 880de0f149d5aae10342af7eaa853435
Transpilation MD5: 368b2c25f43cbd5fb00c15799700a909
Author: stefan
Category: javax
Type: JavaX fragment (include)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2022-03-11 01:29:11
Source code size: 324 bytes / 10 lines
Pitched / IR pitched: No / No
Views / Downloads: 74 / 111
Version history: 2 change(s)
Referenced in: [show references]