Package com.storedobject.core
Class StringUtility
java.lang.Object
com.storedobject.common.StringUtility
com.storedobject.core.StringUtility
Additional static string utility methods useful in the context of the platform.
- Author:
- Syam
-
Nested Class Summary
Nested classes/interfaces inherited from class com.storedobject.common.StringUtility
StringUtility.List
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic String
Formats a string as a numeric string with thousands separation (If the default currency is INR, it will be done in India style).static String
Make a label for the class.static String
Make a label for the class.static String
words
(BigInteger value) Formats a numeric value with thousands separation (If the default currency is INR, it will be done in India style).Methods inherited from class com.storedobject.common.StringUtility
append, bitsValue, bitsValue, collect, collect, concat, copy, distanceLevenshtein, encodeForXML, equals, fill, findNonWhitespace, findWhitespace, firstCaps, firstCaps, format, format, format, format, formatIndian, formatIndian, formatIndian, getCharCount, getCSV, getStringCount, getTrace, getTrace, indexOf, indexOf, indexOf, insert, isBlank, isDigit, isLetter, isLetterOrDigit, isModulus11, isModulus11, isNumber, isWhite, isWhite, makeLabel, makeLabel, makeString, makeString, makeString, makeString, md5, minutesToAMPM, minutesToString, modulus11, modulus11, pack, pack, padLeft, padLeft, padRight, padRight, parseToProperties, remove, removeAll, removeNulls, replaceOutside, replicate, same, smoothen, soundex, split, stringify, tagDuplicates, tagDuplicates, toArray, toCamelCase, toCharArray, toHex, toLowerCase, toLowerCase, toNumericRange, toRangeString, toRangeString, toString, toString, toString, toUpperCase, toUpperCase, trim, trimLeft, trimLeft, trimRight, trimRight, words, words, wordsIndian, wordsIndian
-
Constructor Details
-
StringUtility
public StringUtility()
-
-
Method Details
-
makeLabel
Make a label for the class. Example: com.storedobject.core.SystemUser => "System User". In the case of data classes, if a "Table" annotation exists, title will be picked up from the annotation.- Parameters:
c
- Class for which label to be created- Returns:
- Label
-
makeLabel
Make a label for the class. Example: com.storedobject.core.SystemUser => "System User". In the case of data classes, if a "Table" annotation exists, title will be picked up from the annotation.- Parameters:
c
- Class for which label to be createdignoreTableAnnotation
- Whether to ignore table annotation or not- Returns:
- Label
-
words
Formats a numeric value with thousands separation (If the default currency is INR, it will be done in India style).- Parameters:
value
- Value- Returns:
- Value in words.
-
format
Formats a string as a numeric string with thousands separation (If the default currency is INR, it will be done in India style).- Parameters:
s
- String of digits (can contain a decimal point)decimals
- Number of decimals required in the output stringseparated
- True if thousands separation is needed in the output- Returns:
- Formatted value.
-