Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## j2meunit.util
Class StringUtil

    java.lang.Object
      |
      +--j2meunit.util.StringUtil

public class StringUtil
extends java.lang.Object

A class with junit related String utilities.

Constructor Summary
`protected` | `StringUtil()` Creates a new StringUtil object.

Method Summary
`static java.lang.String` | `elapsedTimeAsString(long nTime)` Assumes the argument to be a decimal number of milliseconds and formats it into a string.
`static java.lang.String` | `truncate(java.lang.String s, int length)` Truncates a string to a maximum length.

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Constructor Detail

### StringUtil

    protected StringUtil()

  Creates a new StringUtil object.

Method Detail

### elapsedTimeAsString

    public static java.lang.String elapsedTimeAsString(long nTime)

  Assumes the argument to be a decimal number of milliseconds and formats it into a string.

  Parameters:
    `nTime` - The time value to convert
  Returns:
    A string containing the converted value

### truncate

    public static java.lang.String truncate(java.lang.String s,
                                            int length)

  Truncates a string to a maximum length.

  Parameters:
    `s` - The string to truncate
    `length` - The maximum length of the string
  Returns:
    If the string is longer than length, the truncated string, else the original string

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD