be.erwinsmout
Class MyMessageFormat
java.lang.Object
be.erwinsmout.MyMessageFormat
public class MyMessageFormat
- extends java.lang.Object
Provides a MessageFormat.format() method that relieves localizers of having to know whether or not they should be typing single or double quotes in order to obtain a single quote. Before invoking the MessageFormat.format() method, ALL quotes in the pattern are replaced with two single quotes, so that a quote in the input pattern will NEVER be interpreted as a MessageFormat.format() meta-character.
- Author:
- Erwin Smout
Method Summary |
static java.lang.String |
format(java.lang.String pattern,
java.lang.Object[] parameters)
formats a message by filling in a pattern with values taken from the given array of parameters. |
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
format
public static java.lang.String format(java.lang.String pattern,
java.lang.Object[] parameters)
- formats a message by filling in a pattern with values taken from the given array of parameters. Prior to invoking the standard java MessageFormat.format() method, all single quotes (') in the pattern are replaced with double quotes (''), such that a quote will NEVER be interpreted as a MessageFormat.format() meta-character.
- Parameters:
pattern
- The patternparameters
- The parameters
- Returns:
- the formatting result