jminhep.utils
Class StringUtil
- java.lang.Object
-
- jminhep.utils.StringUtil
-
public class StringUtil extends java.lang.ObjectStringUtil - String utility class
-
-
Constructor Summary
Constructors Constructor and Description StringUtil()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method and Description static java.lang.Stringconcat(java.lang.Object[] objects)Takes a list of objects and concatenates the toString() representation of each object and returns the result.static java.lang.Stringfill(char c, int length)Creates a string of length "length" composed of the character "c", or the null string if c <= 0.static java.lang.Stringremove(java.lang.String original, java.lang.String search)Return a String with all occurrences of the "search" String within "original" removed.static java.lang.Stringreplace(java.lang.String original, java.lang.String from, java.lang.String to)Return a String with all occurrences of the "from" String within "original" replaced with the "to" String.static java.lang.StringtoJava(java.lang.String mimeCharset)static java.lang.StringtoMIME(java.lang.String encoding)
-
-
-
Method Detail
-
replace
public static java.lang.String replace(java.lang.String original, java.lang.String from, java.lang.String to)Return a String with all occurrences of the "from" String within "original" replaced with the "to" String. If the "original" string contains no occurrences of "from", "original" is itself returned, rather than a copy.- Parameters:
original- the original Stringfrom- the String to replace within "original"to- the String to replace "from" with
-
remove
public static java.lang.String remove(java.lang.String original, java.lang.String search)Return a String with all occurrences of the "search" String within "original" removed. If the "original" string contains no occurrences of "search", "original" is itself returned, rather than a copy.- Parameters:
original- the original Stringsearch- the String to be removed
-
concat
public static java.lang.String concat(java.lang.Object[] objects)
Takes a list of objects and concatenates the toString() representation of each object and returns the result.- Parameters:
objects- an array of objects
-
fill
public static java.lang.String fill(char c, int length)Creates a string of length "length" composed of the character "c", or the null string if c <= 0.- Parameters:
length- the length of the returned stringc- the character is solely consists of
-
toJava
public static java.lang.String toJava(java.lang.String mimeCharset)
-
toMIME
public static java.lang.String toMIME(java.lang.String encoding)
-
-
DMelt 3.0 © DataMelt by jWork.ORG