public class OAString extends Object
OAConverter
Modifier and Type | Field and Description |
---|---|
static String |
FS |
static String |
LoremLipsum |
static String |
NL |
static String |
OtherFileNameChars |
Constructor and Description |
---|
OAString() |
Modifier and Type | Method and Description |
---|---|
static String |
accept(String value,
String chars)
Removes characters from a String that are not valid.
|
static String |
align(String value,
int width,
boolean bAlignLeft,
char charPad)
Aligns a string either left or right to a certain width.
|
static String |
append(String orig,
String append) |
static String |
append(String orig,
String append,
String sep) |
static String |
colorToHex(Color color)
Converts a color to a String that represents the Hex value.
|
static int |
compare(String s1,
String s2) |
static String |
concat(String toText,
String value) |
static String |
concat(String toText,
String value,
String sepChar) |
static String |
concat(String toText,
String value,
String sepChar,
boolean bForce) |
static String |
convert(String value,
char c,
String replace)
Used to replace one value with another within a String.
|
static String |
convert(String line,
String search,
String replace)
Used to replace one value with another within a String.
|
static String |
convert(String line,
String search,
String replace,
boolean bIgnoreCase)
Used to replace one value with another within a String.
|
static String |
convert(String line,
String search,
String replace,
boolean bIgnoreCase,
boolean bFirstOnly,
int startPos,
int endPos) |
static String |
convertFileName(String fileName)
Converts fileName path to correct system file.separator characters.
|
static String |
convertFileName(String fileName,
boolean bEndWithSlashChar)
Converts fileName path to correct system file.separator characters.
|
static String |
convertFromHtml(String html)
Convert '&' prefixed html codes to character.
|
static String |
convertHungarian(String value)
Used to convert a String that uses Hungarian notation to a titled, space separated String.
|
static String |
convertIgnoreCase(String line,
String search,
String replace)
Used to replace one value with another within a String, ignoring case.
|
static String |
convertTextToHTML(String value,
boolean bAddHTMLTag) |
static String |
convertToAscii(String text)
Make sure that all chars value is <= 127, otherwise convert to a space char
|
static String |
convertToDisplayName(String value) |
static String |
convertToHtml(String value) |
static String |
convertToHungarian(String value)
Example: "Your Name Test" converts to "YourNameTest"
Example: "your name test" converts to "yourNameTest"
Example: "Your_name_test" converts to "YourNameTest"
Example: "your.name.test" converts to "yourNameTest"
first char upper/lower-case is not changed.
|
static String |
convertToHungarian(String value,
String sepChars) |
static String |
convertToJavaIndentifier(String txt) |
static String |
convertToNonNull(String str) |
static String |
convertToSHAHash(String input) |
static String |
convertToValidPhoneNumber(String phone)
Only allows digits and ' ' characters.
|
static String |
convertToXml(String value)
converts null to "" and does other xml/html conversions for <, > & " '
|
static String |
convertToXML(String value)
converts null to "" and does other xml/html conversions for <, > & " '
|
static String |
convertToXML(String value,
boolean bCData)
Convert a String to a valid XML String, using special coding for illegal characters.
|
static String |
convertToXML(String value,
boolean bCData,
boolean bIsHtml) |
static String |
convertToXML(String value,
boolean bCData,
boolean bIsHtml,
boolean bLeaveCRLF) |
static int |
count(String str,
String sep)
Returns the amount of particular String within a String.
|
static String |
cpp(Class clazz,
String... args) |
static String |
cpp(String... args)
Short name for createPropertyPath
|
static String |
createDisplayName(String value) |
static String |
createPropertyPath(Class clazz,
String... args) |
static String |
createPropertyPath(String... args)
Used to create a dot separated String, used for property paths.
|
static String |
createRandomString(int min,
int max) |
static String |
createRandomString(int min,
int max,
boolean bUseDigits,
boolean bUseAlpha,
boolean bCapFirstChar)
Returns a string that has random generated characters
|
static String |
csv(String toText,
Object value) |
static int |
dcount(String str,
char sep) |
static int |
dcount(String str,
String sep)
Used to get a count of the number of values between a separator/delimiter.
|
static String |
decodeIllegalXML(String value)
Convert XML Strings converted with encodeIllegalXML() back to a String.
|
static String |
defaultString(String str)
Convert to a string, if null then it returns ""
|
static String |
defaultString(String str,
String strIfNull)
Convert to a string, if null then return strIfNull
|
protected static String |
encodeIllegalXML(char ch,
boolean bConvertLTGT)
Encode illegal XML characters with <OAXML#999/> where 999 is character integer value.
decodeIllegalXML() is used to convert back to character. |
static String |
encodeIllegalXML(String value)
Encode/Replace chars that are illegal for XML/HTML with & codes.
|
static boolean |
equals(String s1,
String s2)
Case sensitive, compares two String to see if they are equal.
|
static boolean |
equals(String s1,
String s2,
boolean bIgnoreCase)
Compares two String to see if they are equal.
|
static boolean |
equalsIgnoreCase(String s1,
String s2) |
static String |
field(String str,
char sep,
int beg)
Used to retrieve a portion of a String based on a separator value.
|
static String |
field(String str,
char sep,
int beg,
int amt)
Used to retrieve a portion of a String based on a separator value.
|
static String |
field(String str,
String sep,
int beg)
Used to retrieve a portion of a String based on a separator value.
|
static String |
field(String str,
String sep,
int beg,
int amt)
Used to retrieve a portion of a String based on a separator value.
|
static String |
fmt(String str)
Returns a "non-null" value
|
static String |
fmt(String str,
String format)
Used to format/mask Strings using a format/mask String.
|
static String |
format(boolean value,
String format)
Calls OAConverter to format boolean to a String.
|
static String |
format(double value,
String format)
Used to convert an double to a formatted String, either using OAConverter or OAString.format()
param vaule integer to format
|
static String |
format(int value,
String format)
Used to convert an integer to a formatted String, either using OAConverter or OAString.format()
param vaule integer to format
|
static String |
format(long value,
String format)
Calls OAConverter to convert/format number.
|
static String |
format(OADate value)
Calls OAConverter to convert and format OADate.
|
static String |
format(OADateTime value,
String format)
Calls OAConverter to convert and format OADateTime.
|
static String |
format(String str,
String format)
fmt/format javadoc
Used to format/mask Strings using a "Pick like" format/mask String.
|
static String |
getAorAn(String s) |
static String |
getBegin(String text,
int len)
get first N chars from string.
|
static String |
getClassName(Class c)
Removes the package name
|
static Map<String,String> |
getCSSMap(String style) |
static String |
getDirectoryName(String filePath) |
static String |
getDisplayName(String value)
Used to convert a String that uses Hungarian notation to a titled, space separated String.
|
static String |
getDummyText(int normal,
int min,
int max) |
static String |
getEnd(String text,
int len)
get last N chars from string.
|
static String |
getFileName(String filePath) |
static String |
getFirst(String text,
int len) |
static Map<String,String> |
getHTMLAttributeMap(String htmlTag) |
static String |
getJavaIndentifier(String txt) |
static String |
getLast(String text,
int len) |
static String |
getNonNull(String str) |
static String |
getPackageName(Class c)
gets package name
|
static String |
getPlural(String s)
Converts a String to plural.
|
static String |
getPossessive(String str)
Converts a String to possissive by adding "'s" or "'".
|
static String |
getRandomString(int min,
int max) |
static String |
getRandomString(int min,
int max,
boolean bUseDigits,
boolean bUseAlpha,
boolean bCapFirstChar) |
static String |
getRandomString(int normal,
int min,
int max) |
static String |
getRandomString(int normal,
int min,
int max,
boolean bUseDigits,
boolean bUseAlpha,
boolean bCapFirstChar) |
static String |
getSHAHash(String input) |
static String |
getTitle(String s)
Converts first letter in each word to uppercase.
|
static String |
getTitle(String s,
String basedOn) |
static String |
getTitleCase(String s)
Converts first letter in each word to uppercase.
|
static boolean |
hasDigits(String word)
Returns true if String has any digit characters in it.
|
static String |
hilite(String line,
String search) |
static String |
hilite(String line,
String search,
String beginTag,
String endTag) |
static String |
hilite(String line,
String search,
String beginTag,
String endTag,
boolean bIgnoreCase) |
static String |
hiliteIgnoreCase(String line,
String search,
String beginTag,
String endTag) |
static String |
indent(String text,
int amt) |
static boolean |
isDate(String s)
Returns true if String is a valid Date.
|
static boolean |
isDateTime(String s)
Returns true if String is a valid DateTime.
|
static boolean |
isEmpty(Object obj) |
static boolean |
isEmpty(Object obj,
boolean bTrim) |
static boolean |
isEqual(String s,
String s2) |
static boolean |
isEqual(String s,
String s2,
boolean bIgnoreCase) |
static boolean |
isInteger(String str) |
static boolean |
isLegalXML(String value)
Used to determine if a String has any illegal XML characters in it.
|
static boolean |
isNotEmpty(Object obj) |
static boolean |
isNumber(String str)
Returns true if String is a valid number.
|
static boolean |
isTime(String s)
Returns true if String is a valid Time.
|
static String |
lineBreak_OLD(String origLine,
int width,
String delim,
int maxLines)
Split text into lines, and adding a line seperator between the breaks.
|
static String |
lineBreak(String origLine,
int width)
Shorten line to width amount of characters.
|
static String |
lineBreak(String origLine,
int width,
String delim,
int maxLines)
Formats a string to have a max width per line separated by a delimiter.
|
static void |
main(String[] args) |
static void |
main2(String[] args) |
static void |
main99(String[] args) |
static void |
mainB(String[] args) |
static void |
mainX(String[] args) |
static void |
mainXX(String[] args) |
static void |
mainXXx(String[] args) |
static String |
makeFirstCharLower(String s) |
static String |
makeFirstCharUpper(String s) |
static String |
makeFirstUpperCharsLower(String s)
Example: GSMRServer -> gsmrServer
|
static String |
makeJavaIndentifier(String txt)
Converts any non-Java indentifier characters to a '_'
|
static String |
makePlural(String str)
Converts a String to plural.
|
static String |
makePossessive(String str) |
static String |
makeSingular(String str)
Converts a String that is plural to singular.
Converts end characters: "hes" to "h", "ses" to "s", "zzes" to "zz", "ies" to "y", "s" to "". |
static String |
mask(String value,
String mask)
Used to generate a String based on a mask.
|
static String |
mask(String value,
String mask,
boolean bRightJustified)
Used to generate a String based on a mask.
|
static String |
mfcl(String s) |
static String |
mfcu(String s) |
static String |
mfcu(String s,
String basedOn) |
static String |
mfucl(String s) |
static boolean |
notEmpty(Object obj) |
static String |
notNull(String s)
Convert to a string, if null then it returns ""
|
static String |
pad(String value,
int amount,
boolean bAddToEnd,
char padCharacter)
Append characters to begin/end of a value.
|
static int |
parseInt(String val) |
static String[] |
parseLine(String line,
char sep,
boolean bCouldHaveQuotes) |
static String[] |
parseLine(String line,
char sep,
boolean bCouldHaveQuotes,
int sizeEstimate)
Strips out leading and trailing whitespace for each column.
|
static String |
pickFormat(String str,
String format) |
static String |
removeCharacters(String line,
String search)
Remove any and all search characters from a string.
|
static String |
removeEndingChars(String s,
int amt) |
static String |
removeNonDigits(String line)
Remove any and all characters that are not digits
|
static String |
removeNonDigits(String line,
boolean bAllowDot) |
static String |
removeNonFileNameChars(String line)
Remove any and all characters that are not valid in filename.
|
static String |
removeOtherCharacters(String line,
String keep)
Remove any and all characters that are not in string
|
static String |
soundex(String word)
Soundex is used for creating a code that is used to find similar words.
|
static String |
strip(String value,
String chars)
Removes characters from a String.
|
protected static String |
stripChars(String value,
String chars,
boolean bKeepChars)
called by strip, accept
|
static String |
stripNumber(String value)
Remove digit characters from String.
|
static String |
substring(String s,
int pos1,
int pos2) |
static String |
titleCase(String s)
Converts first letter in each word to uppercase.
|
protected static String[] |
tokenize(String text,
char delimChar,
boolean spaceIsDelim,
boolean bIncludeDelim,
char begChar,
char endChar,
char eovChar)
This will split a string based on a delimiter char,
and will also take into account values that are in single or double quotes.
|
static String |
toNonNull(String str) |
static String |
toNumberString(int x)
Convert a number to a string value.
|
static String |
toString(Object obj) |
static String |
toString(String str)
Convert to a string, if null then it returns ""
|
static String |
toString(String str,
String strIfNull)
Convert to a string, if null then it returns ""
|
static String |
toTitleCase(String s)
Converts first letter in each word to uppercase.
|
String |
toUTF8(String isoString) |
static String |
trim(String line)
String trim method.
1: removes leading spaces 2: removes extra spaces within. |
static String |
trimEndingWhitespace(String text)
Remove ending whitspace from a string.
|
static String |
trimWhitespace(String text)
Removes any leading & trailing whitespace chars, but will leave single space chars
within text.
|
static String |
trunc(String orig,
int width)
Shorten line to width amount of characters.
|
static String |
truncate(String orig,
int width) |
static String |
unindent(String text)
remove leading spaces from each line in a string that is separated by '\n'
|
static String |
unindent(String text,
boolean bBasedOnFirstLine) |
static String |
unindentCode(String text)
Used for removing the extra indent spacing for pasting code.
|
public static final String NL
public static final String FS
public static final String OtherFileNameChars
public static final String LoremLipsum
public static String trim(String line)
Example: " this is a test " will be: "this is a test"
public static String getEnd(String text, int len)
len
- number of chars to getpublic static String getBegin(String text, int len)
len
- number of chars to getpublic static String convertToXml(String value)
convertToXML(String,boolean)
public static String convertToXML(String value)
see: http://www.w3.org/TR/REC-xml#NT-Char Legal Chars ::= #x9 | #xA | #xD | [#x20-#xD7FF] | [#xE000-#xFFFD] | [#x10000-#x10FFFF] 9, 10, 13 tab, lf, cr
convertToXML(String,boolean)
public static String encodeIllegalXML(String value)
convertToXML(String,boolean)
protected static String encodeIllegalXML(char ch, boolean bConvertLTGT)
This is used internally by convertToXML
ch
- is character to encodebConvertLTGT
- if true then convert < to < and > to >. This is needed when it
is not going to be used in a XML CDATA block.decodeIllegalXML(java.lang.String)
,
convertToXML(String,boolean)
public static String convertToXML(String value, boolean bCData)
Note: Some characters are illegal even within CDATA blocks.
NOTE: decodeIllegalXML() should be called to reverse this String, since encodeIllegalXML() uses a special tag.
value
- is XML String to convert.bCData
- true if this String will be used in an XML CDATA block.decodeIllegalXML(java.lang.String)
,
encodeIllegalXML(java.lang.String)
public static String convertToXML(String value, boolean bCData, boolean bIsHtml, boolean bLeaveCRLF)
public static boolean isLegalXML(String value)
public static String decodeIllegalXML(String value)
encodeIllegalXML(java.lang.String)
public static String convert(String value, char c, String replace)
replace
- the string or null that will replace every occurance of the the character "c"convert()
public static String convertIgnoreCase(String line, String search, String replace)
replace
- the string or null that will replace every occurance of the the search stringconvert()
public static String convert(String line, String search, String replace)
replace
- the string or null that will replace every occurance of the the search stringconvert()
public static String removeCharacters(String line, String search)
line
- original datasearch
- characters to removepublic static String removeOtherCharacters(String line, String keep)
line
- original data
param search characters to keeppublic static String removeNonDigits(String line)
line
- original datapublic static String removeNonFileNameChars(String line)
public static String convert(String line, String search, String replace, boolean bIgnoreCase)
line
- is String that is to be converted.search
- is String that is to be replaced.replace
- is replacement value to use. If null, then a blank String will be used.bIgnoreCase
- if true, then search is not case sensitive.public static String convert(String line, String search, String replace, boolean bIgnoreCase, boolean bFirstOnly, int startPos, int endPos)
public static String convertHungarian(String value)
Example: "yourNameTest" converts to "Your Name Test"
value
- String to convertpublic static String convertToHungarian(String value)
public static String getDisplayName(String value)
Example: "yourNameTest" converts to "Your Name Test"
Example: "USAmerica" converts to "US America"
Example: "v.via" converts to "V.Via"
value
- String to convertpublic static String makeSingular(String str)
makePlural(java.lang.String)
public static String getPlural(String s)
makePlural(java.lang.String)
public static String makePlural(String str)
Note: case will be matched, whatever characters are appended will match the case of the String. This is the reverse method of makeSingular.
makeSingular(java.lang.String)
public static String getPossessive(String str)
public static String getTitleCase(String s)
public static String toTitleCase(String s)
public static String titleCase(String s)
public static String makeFirstUpperCharsLower(String s)
public static String getTitle(String s)
public static String getTitle(String s, String basedOn)
basedOn
- is another name that this one should use to figure out which letters to capitalize.
ex: gsmrServer, GSMRServer => GSMRServerpublic static String field(String str, char sep, int beg)
field(String,String,int,int)
public static String field(String str, char sep, int beg, int amt)
field(String,String,int,int)
public static String field(String str, String sep, int beg)
field(String,String,int,int)
public static String field(String str, String sep, int beg, int amt)
str
- String to parsesep
- seperator wihin strbeg
- field to find, where first field is 1amt
- number of fields to return, -1 for all after the begpublic static int dcount(String str, String sep)
Note: even if there is not a value between consective separators, it is still counted as another value - in this case a blank.
str
- is String to search. If null or length = 0, then 0 is returned.sep
- separator.public static int dcount(String str, char sep)
public static int count(String str, String sep)
str
- is String to search within.sep
- is String to search for.public static String pad(String value, int amount, boolean bAddToEnd, char padCharacter)
value
- is String to append to. If null, then it will be initialized to an empty string.amount
- is number of characters to add.bAddToEnd
- if true, then charPad characters are appended to value, else charPad chars are prefixed to value.padCharacter
- is the character to use for adding to value.align(java.lang.String, int, boolean, char)
public static String align(String value, int width, boolean bAlignLeft, char charPad)
value
- is String to alter. If null, then it will be initialized to an empty string.width
- is number of characters for the converted string. If <= 0, then a blank string is returned.bAlignLeft
- if true then value is right aligned, else left aligned.charPad
- is the character to use to pad the value, if length of value is less then width. The
value will then have this character either at the beginning or ending, depending on value of bAlignLeft.pad(String,int,boolean,char)
public static String format(long value, String format)
public static String format(int value, String format)
format
- if String has an "L", "R", or "C" in it, then OAString.format(String,String) will be used, else
OAConverter.toString() will be called.
see OAConverterNumberfmt(String,String)
public static String format(double value, String format)
format
- if String has an "L", "R", or "C" in it, then OAString.format(String,String) will be used, else
OAConverter.toString() will be called, which uses Java formatting.
see OAConverterNumberfmt(String,String)
public static String format(boolean value, String format)
public static String format(OADateTime value, String format)
public static String format(OADate value)
public static String format(String str, String format)
Also suoports formats for Date/Times (see OADateTime) and Numbers (see OAConverterNumber)
Formatting Strings
Example: fmt(str,"12 L2.,$0(MASK)"); Format description for "12 L2,$0(MASK)": 12 = width - not required. will pad with spaces if pad character is not defined. if width is not included, then length of String is not restricted. ' ' = trailing blanks that will be added to the end of formatted String. L = L, R, or C justified 2 = decimal places - can only be ONE digit. Rounding will be used. . = if value has to be truncated, then "..." will be the last 3 chars. Only used with "L" justified. , = if you want commas to seperate numbers $ = dollar sign, only if 'R' justified puts it in first char 0 = any pad character - default space. Dont put this 1 after L/R, since that position is used for the amount of decimal places. Mask = must be in "()". Use # character to have actual characters inserted, all other characters in mask will be inserted. Examples: fmt("1234.5", "R4,") "R4," = align right, 4 decimal places with comma seperators. output: "1,234.5000" fmt("123.5", "R00") "R00" = align right, 0 decimal places (causes rounding), pad with '0' character output: "123" fmt("123.5", "8R00") "8R00" = 8 width to fill, output: "00000123" fmt("123.5", "8 R00") "8 R00" = 8 width, append one space, right justified, 0 decimal places, '0' fill output: "00000123 " fmt("1231231234","13 R((###)###-####)") "13 R((###)###-####)" = 13 width, append 2 spaces, right justified, mask to use. Note: the mask must be put into () and use # to denote where to insert the characters within the supplied String. output: "(123)123-1234 " fmt("CustomerName", "8L.") output: "Custo..."
public static String fmt(String str, String format)
format(String,String)
public static String stripNumber(String value)
value
- is String to strip.public static String mask(String value, String mask)
value
- is String to use with mask.mask
- where all # characters will be replaced by data in value. All other characters (non #)
in mask will be outputted with new String.public static String mask(String value, String mask, boolean bRightJustified)
value
- is String to use with mask. If null, then value is set to a blank "" String.mask
- where all # characters will be replaced by data in value. All other characters (non #)
in mask will be outputted with new String.bRightJustified
- if true, then mask will be generated from right to left, else left to right.public static String strip(String value, String chars)
value
- is String to strip from.chars
- values to remove from valuepublic static String accept(String value, String chars)
value
- is String to strip from.chars
- is the characters that are valid, other characters will be removed.protected static String stripChars(String value, String chars, boolean bKeepChars)
public static String convertFileName(String fileName)
public static String convertFileName(String fileName, boolean bEndWithSlashChar)
public static String colorToHex(Color color)
public static boolean hasDigits(String word)
public static String soundex(String word)
20100417 now using more advanced algorithm see: http://www.archives.gov/genealogy/census/soundex.html
This code is set to 4 char value - padded with char '0'.
If word == NULL then sndx = "0000"
use first letter exclude "AEHIOUWY" or any char that is not a letter exclude all duplicates '0' pad to 4 chars Note: this will also use digits From: "BFPVCGJKQSZXDTLMNR" To : "111122222222334556" EXAMPLE: soundex(sndx,"Vincent") sndx = "V523" soundex(sndx,"Via") sndx = "V000"
word
- String to create a soundex code for.public static boolean isNumber(String str)
str
- String to checkpublic static boolean isInteger(String str)
public static boolean isDate(String s)
s
- String to checkpublic static boolean isTime(String s)
s
- String to checkpublic static boolean isDateTime(String s)
s
- String to checkpublic static boolean equals(String s1, String s2)
equals(String,String,boolean)
public static boolean equals(String s1, String s2, boolean bIgnoreCase)
bIgnoreCase
- if true, performs a comparision that is case insensitive.equals(String,String,boolean)
public static String toNumberString(int x)
public static String trunc(String orig, int width)
public static String lineBreak(String origLine, int width)
public static String lineBreak_OLD(String origLine, int width, String delim, int maxLines)
width
- delim,
- string to insert at line breakmaxLines,
- the max amount of lines to create. If longer, then "..." will be addedpublic static String createRandomString(int min, int max)
public static String getRandomString(int min, int max)
public static String getRandomString(int normal, int min, int max)
public static String createRandomString(int min, int max, boolean bUseDigits, boolean bUseAlpha, boolean bCapFirstChar)
min
- minimum amount of chars in the result.max
- maximum amount of chars in the result.bUseDigits
- if true will use chars 0-9bUseAlpha
- if true will use chars a-zbCapFirstChar
- if true and bUseAlpha, then the first char will be capitalized, otherwise all chars will be lowercase.public static String getRandomString(int min, int max, boolean bUseDigits, boolean bUseAlpha, boolean bCapFirstChar)
public static String getRandomString(int normal, int min, int max, boolean bUseDigits, boolean bUseAlpha, boolean bCapFirstChar)
public static String getDummyText(int normal, int min, int max)
public static String cpp(String... args)
createPropertyPath(String...)
public static String cpp(Class clazz, String... args)
clazz
- name of the first class, in case it is a generic type. (ex: OALeftJoin.A)args
- public static String createPropertyPath(String... args)
public static String createPropertyPath(Class clazz, String... args)
clazz
- name of the first class, in case it is a generic type. (ex: OALeftJoin.A)args
- each property used in the property path.public static String lineBreak(String origLine, int width, String delim, int maxLines)
width
- max width per line.delim
- inserted into origLine to create line breaksmaxLines
- maximum number of lines, if result is longer, then it will be truncated and append with " ..."public static void mainXX(String[] args)
public static void mainX(String[] args)
public static boolean notEmpty(Object obj)
public static boolean isNotEmpty(Object obj)
public static boolean isEmpty(Object obj)
OACompare.isEmpty(Object)
public static boolean isEmpty(Object obj, boolean bTrim)
public static String fmt(String str)
str
- public static String convertToValidPhoneNumber(String phone)
public static String unindent(String text)
text
- bBasedOnFirstLine
- if true, then each line will only remove the same leading spaces found in the first line. This is good for code.public static String unindentCode(String text)
public static String trimEndingWhitespace(String text)
public static String[] parseLine(String line, char sep, boolean bCouldHaveQuotes, int sizeEstimate)
public static void mainXXx(String[] args)
public static String trimWhitespace(String text)
public static String convertFromHtml(String html)
public static String convertToAscii(String text)
protected static String[] tokenize(String text, char delimChar, boolean spaceIsDelim, boolean bIncludeDelim, char begChar, char endChar, char eovChar)
text
- delimChar
- ex: '=', or ':'bIncludeDelim
- if true then the delim will be included in the tokensbegChar
- ex: '<'endChar
- ex: '>'eovChar
- end of value, ex: ';'public static int parseInt(String val)
public static String toString(String str, String strIfNull)
public static String defaultString(String str)
public static String defaultString(String str, String strIfNull)
public static void main99(String[] args)
public static void mainB(String[] args)
public static String makeJavaIndentifier(String txt)
public static String hiliteIgnoreCase(String line, String search, String beginTag, String endTag)
public static String hilite(String line, String search, String beginTag, String endTag, boolean bIgnoreCase)
public static void main2(String[] args)
public static void main(String[] args)
Copyright © 1999–2019 ViaOA. All rights reserved.