| java.lang.Object org.netbeans.lib.profiler.utils.StringUtils
StringUtils | public class StringUtils (Code) | | Utility methods for String-related operations.
author: Misha Dmitriev author: Ian Formanek |
convertPackedStringsIntoStringArrays | public static String[][] convertPackedStringsIntoStringArrays(byte[] packedData, int[] packedArrayOffsets, int dim)(Code) | | |
floatPerCentToString | public static String floatPerCentToString(float t)(Code) | | Used to print per cent figures with one digit after decimal point
|
formatUserDate | public static String formatUserDate(Date date)(Code) | | Formats provided time/date in a form that is tuned for user wrt to space needed and clarity/usefulness.
It compareses the time/date passed against current time, and decides from one of 5 formats:
- if the time is today, format it just using the time hh:mm:ss AM/PM
- if the time is yesterday, format is as Yesterday, hh:mm AM/PM
- if the time is this week, format is as [Name of Day], hh:mm AM/PM
- if the time is last week, format is as Last [Name of Day], hh:mm AM/PM
- otherwise format it as dd MMM yyyy
Parameters: date - The date to format String with formatted time/date |
mcsTimeToString | public static String mcsTimeToString(long t)(Code) | | Represent time (given in microsecond) in milliseconds, with roughly the same number of meaningful digits
|
nBytesToString | public static String nBytesToString(long b)(Code) | | Represents the given number of bytes as is, or as "xxx K" (if >= 100 KBytes), or as "xxx M" (if >= 100 MBytes)
|
utf8ToString | public static String utf8ToString(byte[] src, int stPos, int utf8Len)(Code) | | |
|
|