Class I18nUtil

java.lang.Object
org.openhab.core.i18n.I18nUtil

@NonNullByDefault public class I18nUtil extends Object
Author:
Denis Nobel - Initial contribution
  • Constructor Details

    • I18nUtil

      public I18nUtil()
  • Method Details

    • isConstant

      public static boolean isConstant(@Nullable String key)
    • stripConstant

      public static String stripConstant(String key)
    • stripConstantOr

      public static String stripConstantOr(@Nullable String key, Supplier<String> supplier)
      If key is a constant strip the constant part, otherwise use the supplier provided string.
      Parameters:
      key - the key
      supplier - the supplier that return value is used if key is identified as a constant
      Returns:
      the key with the stripped constant marker or the supplier provided key if it is not identified as a constant