Libraryless. Click here for Pure Java version (4821L/27K).
1 | static int indexOfTabNameWithoutTrailingCount(JTabbedPane tabs, S name) { |
2 | if (tabs == null) ret 1; |
3 | ret swing(-> { |
4 | reMutable name = dropTrailingBracketedCount(name); |
5 | int n = tabs.getTabCount(); |
6 | for i to n: |
7 | if (eqic(name, dropTrailingBracketedCount(tabs.getTitleAt(i)))) |
8 | ret i; |
9 | ret -1; |
10 | }); |
11 | } |
Began life as a copy of #1034038
download show line numbers debug dex old transpilations
Travelled to 3 computer(s): bhatertpkbcr, mowyntqkapby, mqqgnosmbjvj
No comments. add comment
Snippet ID: | #1034132 |
Snippet name: | indexOfTabNameWithoutTrailingCount - also case-insensitive |
Eternal ID of this version: | #1034132/3 |
Text MD5: | 0015f827b1689ec565bc491e5445eeff |
Transpilation MD5: | 0fcf971a0a8f04e55f55e8dd4d84e294 |
Author: | stefan |
Category: | javax / gui |
Type: | JavaX fragment (include) |
Public (visible to everyone): | Yes |
Archived (hidden from active list): | No |
Created/modified: | 2022-01-24 01:06:23 |
Source code size: | 335 bytes / 11 lines |
Pitched / IR pitched: | No / No |
Views / Downloads: | 125 / 202 |
Version history: | 2 change(s) |
Referenced in: | [show references] |