1 | static S shortenClassName(S name) { |
2 | if (name == null) null; |
3 | int i = lastIndexOf(name, "$"); |
4 | if (i < 0) i = lastIndexOf(name, "."); |
5 | ret i < 0 ? name : substring(name, i+1); |
6 | } |
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: | 614 / 2555 |
Version history: | 4 change(s) |
Referenced in: | [show references] |