public static @ActionText String extractMnemonic(@ActionText String caption, Set<? super Character> usedMnemonics) {
    if (StringUtil.isEmpty(caption)) return "";

    for (int i = 0; i < caption.length(); i++) {
      char c = caption.charAt(i);
      if (usedMnemonics.add(Character.toUpperCase(c))) {
        return caption.substring(0, i) + UIUtil.MNEMONIC + caption.substring(i);
      }
    }

    return caption + " ";
  }
public static @ActionText String extractMnemonic(@ActionText String caption, Set<? super Character> usedMnemonics)