Android String Format format(String formatString, Object... args)

Here you can find the source of format(String formatString, Object... args)

Description

format

Declaration

public static String format(String formatString, Object... args) 

Method Source Code

//package com.java2s;

import java.util.Formatter;

public class Main {
    public static String format(String formatString, Object... args) {
        Formatter formatter = new Formatter();
        String formatedString = formatter.format(formatString, args)
                .toString();/*from  w ww .  j  ava  2s  .  com*/
        formatter.close();
        return formatedString;
    }
}

Related

  1. formatNumberWithThreeDecimals(Locale locale, String stringToFormat)
  2. formatNumberWithTwoDecimals(Locale locale, String stringToFormat)
  3. formatPriceWithThreeDecimals(Locale locale, String stringToFormat)
  4. formatVolume(Locale locale, String stringToFormat)
  5. formatPriceWithTwoDecimals(Locale locale, String stringToFormat)
  6. fillSpace(String formatString, int length)
  7. fillString(String formatString, int length, char fillChar, boolean leftFillFlag)
  8. fillZero(String formatString, int length)
  9. format(String message, Object[] params)