Class Handlebars.Utils

    • Constructor Detail

      • Utils

        public Utils()
    • Method Detail

      • isEmpty

        public static boolean isEmpty​(Object value)
        Evaluate the given object and return true is the object is considered empty. Nulls, empty list or array and false values are considered empty.
        Parameters:
        value - The object value.
        Returns:
        Return true is the object is considered empty. Nulls, empty list or array and false values are considered empty.
      • escapeExpression

        public static CharSequence escapeExpression​(CharSequence input)

        Escapes the characters in a String using HTML entities.

        For example:

        "bread" & "butter"

        becomes:
          "bread" & "butter"
         
        Parameters:
        input - the String to escape, may be null.
        Returns:
        The escaped version of the input or the same input if it's a SafeString.