Class MarkupUtils


  • public class MarkupUtils
    extends Object
    Utility methods related to generating markup.
    • Method Detail

      • quote

        public static String quote​(String text)
        Quotes the provided value as a JavaScript string literal. The input value is surrounded by single quotes and any interior backslash, single or double quotes are escaped (a preceding backslash is added).
        Parameters:
        text -
        Returns:
        quoted text
      • join

        public static String join​(String... values)
        Joins together several strings, sorting them alphabetically and separating them with spaces. This is often used when setting the CSS class attribute of an element.
      • join

        public static String join​(List<String> values)
        Joins together several strings, sorting them alphabetically and separating them with spaces. This is often used when setting the CSS class attribute of an element.