static int indexOfTabNameWithoutTrailingCount(JTabbedPane tabs, S name) { if (tabs == null) ret 1; swing { name = dropTrailingBracketedCount(name); int n = tabs.getTabCount(); for i to n: if (eqic(name, dropTrailingBracketedCount(tabs.getTabTitle(i)))) ret i; ret -1; } }