code: private static void addShortcut(StringBuilder sb, Set<String> shortcuts) {
          if (sb.length() > 0) {
              String shortcut = validateShortcut(sb.toString());
              
              if (shortcut != null) {
                  shortcuts.add(shortcut);
              }
              
              sb.delete(0, sb.length());
          }
      }
docs: Adds a parsed shortcut to the set of shortcuts. Only valid shortcuts are added.
  
  @param sb String builder containing a parsed shortcut.
  @param shortcuts Set to receive parsed shortcut.