|
|||||||||
| Home >> All >> [ Util overview ] | PREV CLASS NEXT CLASS | ||||||||
SUMMARY: JAVADOC | SOURCE | DOWNLOAD | NESTED | FIELD | CONSTR | METHOD |
DETAIL: FIELD | CONSTR | METHOD | ||||||||
Util
Class Strings

java.lang.ObjectUtil.Strings
- public abstract class Strings
- extends java.lang.Object
- Version:
- $Id: Strings.java,v 1.5 2003/05/12 10:05:21 joewhaley Exp $
| Field Summary | |
static java.lang.String |
lineSep
|
| Constructor Summary | |
Strings()
|
|
| Method Summary | |
static java.lang.String |
fillup(java.lang.String str,
int length,
boolean left_justify,
char fill)
Fillup char with up to length characters with char `fill' and justify it left or right. |
static java.lang.String |
format(int i,
int length,
boolean left_justify,
char fill)
Return a string for an integer justified left or right and filled up with `fill' characters if necessary. |
static java.lang.String |
hex(int i)
Return the number as a hex string, prepended by "0x". |
static java.lang.String |
hex(java.lang.Object o)
Return a string representation of the address of an object. |
static java.lang.String |
hex16(long i)
Return the number as a hex string, padded to sixteen digits and prepended by "0x". |
static java.lang.String |
hex8(int i)
Return the number as a hex string, padded to eight digits and prepended by "0x". |
static java.lang.String |
left(java.lang.String s,
int w)
Return the w leftmost characters of the string, padding with spaces if necessary. |
static java.lang.String |
replace(java.lang.String str,
java.lang.String old,
java.lang.String new_)
Replace all occurrences of old in str with new_. |
static java.lang.String |
right(java.lang.String s,
int w)
Return the w rightmost characters of the string, padding with spaces if necessary. |
static java.lang.String |
shex(int i)
Return the number as a signed hex string, prepended by "0x". |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
lineSep
public static final java.lang.String lineSep
| Constructor Detail |
Strings
public Strings()
| Method Detail |
hex
public static java.lang.String hex(int i)
- Return the number as a hex string, prepended by "0x".
hex
public static java.lang.String hex(java.lang.Object o)
- Return a string representation of the address of an object.
If we are not running native, then it uses the identity hash code.
hex8
public static java.lang.String hex8(int i)
- Return the number as a hex string, padded to eight digits and prepended by "0x".
hex16
public static java.lang.String hex16(long i)
- Return the number as a hex string, padded to sixteen digits and prepended by "0x".
shex
public static java.lang.String shex(int i)
- Return the number as a signed hex string, prepended by "0x".
left
public static java.lang.String left(java.lang.String s, int w)
- Return the w leftmost characters of the string, padding with spaces if necessary.
right
public static java.lang.String right(java.lang.String s, int w)
- Return the w rightmost characters of the string, padding with spaces if necessary.
replace
public static final java.lang.String replace(java.lang.String str, java.lang.String old, java.lang.String new_)
- Replace all occurrences of old in str with new_.
format
public static final java.lang.String format(int i, int length, boolean left_justify, char fill)
- Return a string for an integer justified left or right and filled up with
`fill' characters if necessary.
fillup
public static final java.lang.String fillup(java.lang.String str, int length, boolean left_justify, char fill)
- Fillup char with up to length characters with char `fill' and justify it left or right.
|
|||||||||
| Home >> All >> [ Util overview ] | PREV CLASS NEXT CLASS | ||||||||
SUMMARY: JAVADOC | SOURCE | DOWNLOAD | NESTED | FIELD | CONSTR | METHOD |
DETAIL: FIELD | CONSTR | METHOD | ||||||||
JAVADOC
Util.Strings