Class MessageFormatUtil


public final class MessageFormatUtil extends Object
This file is a helper class for internal usage only. Be aware that its API and functionality may be changed in future.
  • Method Details

    • format

      public static String format (String pattern, Object... arguments)
      This method provides a generic way for formatting strings. Indexed arguments can be referred with {index}, to escape curly braces you have to double them.

      Only basic escaping is allowed, single quotes in a set of curly braces are not supported and multiple escaped braces in a row are also not supported

      Allowed {{{0}}} Allowed '{0}' Allowed '{{{0}}}'

      Not allowed {{'{0}'}} Not allowed {{{{{0}}}}}

      pattern - to format
      arguments - arguments
      The formatted string