Java String Format StrFormat(String pattern, Object... arguments)

Here you can find the source of StrFormat(String pattern, Object... arguments)

Description

Str Format

License

Open Source License

Declaration

public static String StrFormat(String pattern, Object... arguments) 

Method Source Code

//package com.java2s;
//License from project: Open Source License 

import java.text.MessageFormat;

public class Main {
    public static String StrFormat(String pattern, Object... arguments) {
        Object argumentStr[] = new String[arguments.length];
        for (int i = 0; i < argumentStr.length; i++) {
            argumentStr[i] = arguments[i].toString();
        }/*from  w  ww.  j a  v a2s  .co m*/
        return MessageFormat.format(pattern, argumentStr);
    }
}

Related

  1. getTextAsFormattedLines(String text, int lineLength)
  2. getWriterByFormat(final String format)
  3. isDurationFormatPattern(String formatPattern)
  4. isQueryInFormat(String in)
  5. str(final String messageFormat, final Object... args)
  6. stringFormat(String pattern, Object[] arguments)
  7. stringFormat(String textPattern, Object... args)