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

6
LINES

< > BotCompany Repo | #1025162 // lightlyShortenClassName - drop part before first $ or .

JavaX fragment (include)

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

Author comment

Began life as a copy of #1005243

download  show line numbers  debug dex  old transpilations   

Travelled to 6 computer(s): bhatertpkbcr, mqqgnosmbjvj, pyentgdyhuwx, pzhvpgtvlbxg, tvejysmllsmz, vouqrxazstgt

No comments. add comment

Snippet ID: #1025162
Snippet name: lightlyShortenClassName - drop part before first $ or .
Eternal ID of this version: #1025162/1
Text MD5: 24847b3942099725ffcb98e4068c009d
Author: stefan
Category: javax
Type: JavaX fragment (include)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2019-09-09 23:27:23
Source code size: 179 bytes / 6 lines
Pitched / IR pitched: No / No
Views / Downloads: 232 / 277
Referenced in: #1006654 - Standard functions list 2 (LIVE, continuation of #761)