Here you can find the source of intToStr3(final int param)
Parameter | Description |
---|---|
param | An integer to convert |
public static String intToStr3(final int param)
//package com.java2s; /*/*ww w . j a va 2s. c o m*/ * Utility.java * * HomePage : http://www.codeproject.com/csharp/TraceTool.asp * Download : http://sourceforge.net/projects/tracetool/ * See License.txt for license information * * Author : Thierry Parent * Version : 12.3 * * Provide some utility functions */ public class Main { /** * convert an integer to 3 chars * @param param An integer to convert * @return a String of 3 chars */ public static String intToStr3(final int param) { StringBuffer sb = new StringBuffer(5); // 2 + possible 3 chars sb.append(" ").append(Integer.toString(param)); //$NON-NLS-1$ return sb.substring(sb.length() - 3); } }