| java.lang.Object net.firstpartners.nounit.utility.TextUtil
TextUtil | public class TextUtil (Code) | | Performs common , but tricky tasks.
e.g. Stripping of spaces from Files
|
Method Summary | |
public static String | find(String fullText, int startIndex, String startMarker, String endMarker) | public static String | removeAll(String inputString, String removeString) | public static String | removeTrailing(String inString, String toRemove) | public static String | replace(String string, String oldSubstring, String newSubstring) Replace the first occurrence of oldSubstring in
string , if there is one, with newSubstring . | public static String | replaceAll(String string, String oldSubstring, String newSubstring) Replaces all occurrences of oldSubstring in
string , if there are any, with newSubstring . |
find | public static String find(String fullText, int startIndex, String startMarker, String endMarker)(Code) | | Finds (start and end) markers in piece of text
extracts text (note including markers) in between
Parameters: fullText - to search in Parameters: startIndex - ignore text before this point Parameters: startMarker - start marker for the piece of text to extract Parameters: endMarker - end marker foundText , empty String if nothing found |
removeAll | public static String removeAll(String inputString, String removeString)(Code) | | Remove all instances of input string from Output
Parameters: inputString - Parameters: removeString - updateString |
removeTrailing | public static String removeTrailing(String inString, String toRemove)(Code) | | Strip out any trailing characters
Parameters: inString - to be operated on Parameters: toRemove - string to remove at end if found inString with end removed |
replace | public static String replace(String string, String oldSubstring, String newSubstring)(Code) | | Replace the first occurrence of oldSubstring in
string , if there is one, with newSubstring .
Parameters: string - - Replace a substring of this String Parameters: oldSubstring - - The substring of string to be replaced Parameters: newSubstring - - The string to put into string A new String which is a copy of string with the firstoccurrence of oldSubstring in string , ifthere is one, with newSubstring .Returns null if string is null.Returns string if either substring is null oroldSubstring is empty |
replaceAll | public static String replaceAll(String string, String oldSubstring, String newSubstring)(Code) | | Replaces all occurrences of oldSubstring in
string , if there are any, with newSubstring .
Parameters: string - - Replace substrings of this String Parameters: oldSubstring - - The substring of string to be replaced Parameters: newSubstring - - The string to put into string A new String which is a copy of string with alloccurrences of oldSubstring in string ,if there are any, with newSubstring .Returns null if string is null.Returns string if either substring is null oroldSubstring is empty |
|
|