|
JavaView® v2.00.008 | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Object | +--jv.number.PuString
Utility functions comparing and operating with strings.
| Constructor Summary | |
PuString()
|
|
| Method Summary | |
static java.lang.String |
bracketedString(java.lang.String str,
char leftDelim,
char rightDelim)
Get part of string which is bracketed by two given characters. |
static java.lang.String[][] |
clone(java.lang.String[][] src)
Duplicate array and all entries by recursively cloning all instance variables except inspector panels and lists of registered listeners. |
static int |
commonInitials(java.lang.String str1,
java.lang.String str2)
Returns the length of the initial segment of str1 that equals str2. |
static int |
containsChars(java.lang.String str,
char c)
Returns the number of times the given character appears in the string. |
static java.lang.String |
doubleToString(double d,
int mantissa)
Converts a double to a String with given number of mantissa digits in exponential form '-d.dddddEdd' or ' d.dddddEdd'. |
static java.lang.String |
doubleToString(double d,
int mantissa,
int width)
Converts a double to a string with given number of mantissa digits in non exponential form. |
static int |
fromCharSet(java.lang.String str,
java.lang.String charSet,
int fromIdx)
Returns the length of the initial segment of str which consists entirely of characters from charSet, starting at the given index. |
static int |
indexOfString(java.lang.String[] strings,
java.lang.String string)
Locates a String in an array of Strings. |
static int |
indexOfStringIgnoreCase(java.lang.String[] strings,
java.lang.String string)
Locates a String in an array of Strings, ignoring case. |
static java.lang.String |
intToString(int i,
int width)
Converts an int to a String with given width of String. |
static boolean |
matchPattern(java.lang.String string,
java.lang.String pattern)
Checks whether a string matches a given wildcard pattern. |
static java.lang.String |
mergeStrings(java.lang.String[] str,
char delim)
Merges an array of strings into a single string separated by the specified delimiter. |
static int |
notFromCharSet(java.lang.String str,
java.lang.String charSet,
int fromIdx)
Returns the length of the initial segment of str which consists entirely of characters NOT from charSet, starting at the given index. |
static void |
sort(java.lang.String[] strings)
Sorts an array of Strings and modifies array in place. |
static java.lang.String[] |
sort(java.lang.String[] origStrings,
int[] index)
Sorts an array of Strings without modifying the original array. |
static java.lang.String[] |
splitString(java.lang.String str,
char delim)
Turns a string into an array of strings, by splitting it at the specified character. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
public PuString()
| Method Detail |
public static java.lang.String[][] clone(java.lang.String[][] src)
null.#copy(String)
public static int fromCharSet(java.lang.String str,
java.lang.String charSet,
int fromIdx)
public static int notFromCharSet(java.lang.String str,
java.lang.String charSet,
int fromIdx)
public static boolean matchPattern(java.lang.String string,
java.lang.String pattern)
public static int commonInitials(java.lang.String str1,
java.lang.String str2)
public static int containsChars(java.lang.String str,
char c)
public static java.lang.String bracketedString(java.lang.String str,
char leftDelim,
char rightDelim)
str - String containing bracketed substring.leftDelim - left bracket characterrightDelim - right bracket characternull if delimiter no found.
public static java.lang.String[] splitString(java.lang.String str,
char delim)
If argument string ends with the delimiter then delimiter is ignored.
str - Delimiter separated strings to split.delim - Character delimiter.
public static java.lang.String mergeStrings(java.lang.String[] str,
char delim)
If the array is null, then an empty string is returned. Otherwise, the number of delimiters in the resulting string is equal to str.length-1. Missing strings are considered empty strings.
str - Array with strings to merge.delim - Character to separate merged strings.public static void sort(java.lang.String[] strings)
public static java.lang.String[] sort(java.lang.String[] origStrings,
int[] index)
public static int indexOfString(java.lang.String[] strings,
java.lang.String string)
public static int indexOfStringIgnoreCase(java.lang.String[] strings,
java.lang.String string)
public static java.lang.String intToString(int i,
int width)
i - the intwidth - an int with the width for the returned String
public static java.lang.String doubleToString(double d,
int mantissa,
int width)
null is returned.d - the doublemantissa - an int with the number of mantissa digitswidth - an int with the width of the returned stringnull in case of failure
public static java.lang.String doubleToString(double d,
int mantissa)
d - the doublemantissa - an int with the number of digits behind the period
|
JavaView® v2.00.008 | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||