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   

Travelled to 2 computer(s): mqqgnosmbjvj, tvejysmllsmz

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: 4 / 11
Referenced in: [show references]