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

6
LINES

< > BotCompany Repo | #1005243 - shortenClassName - only return part after last $ or .

JavaX fragment (include)

static S shortenClassName(S name) {
  if (name == null) null;
  int i = lastIndexOf(name, "$");
  if (i < 0) i = lastIndexOf(name, ".");
  ret i < 0 ? name : substring(name, i+1);
}

download  show line numbers  debug dex  old transpilations   

Travelled to 21 computer(s): aoiabmzegqzx, bhatertpkbcr, cbybwowwnfue, cfunsshuasjs, ddnzoavkxhuk, ekrmjmnbrukm, fzcpzdstiiyc, gwrvuhgaqvyk, ishqpsrjomds, lpdgvwnxivlt, mqqgnosmbjvj, onxytkatvevr, ppjhyzlbdabe, pyentgdyhuwx, pzhvpgtvlbxg, sawdedvomwva, tslmcundralx, tvejysmllsmz, vouqrxazstgt, whxojlpjdney, xrpafgyirdlv

No comments. add comment

Snippet ID: #1005243
Snippet name: shortenClassName - only return part after last $ or .
Eternal ID of this version: #1005243/5
Text MD5: 13452d4465bb9b6ed0183864136a8f1d
Author: stefan
Category: javax
Type: JavaX fragment (include)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2017-03-02 22:52:03
Source code size: 186 bytes / 6 lines
Pitched / IR pitched: No / No
Views / Downloads: 366 / 2251
Version history: 4 change(s)
Referenced in: [show references]

Formerly at http://tinybrain.de/1005243 & http://1005243.tinybrain.de