|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES All Classes | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.commons.lang.StringUtils
org.loom.util.StringUtils
public class StringUtils
Field Summary |
---|
Fields inherited from class org.apache.commons.lang.StringUtils |
---|
EMPTY, INDEX_NOT_FOUND |
Constructor Summary | |
---|---|
StringUtils()
|
Method Summary | |
---|---|
static void |
addReplaceChars(char from,
char replacement)
|
static void |
addReplaceChars(char from,
char to,
char replacement)
|
static long |
alphaToNumber(java.lang.String text)
Convert a short alphanumeric representation back to the original number using Base58 |
static java.lang.String |
calculateMD5(byte[] text)
Calculate the MD5 hash for the given byte array |
static java.lang.String |
calculateMD5(org.springframework.core.io.Resource resource)
Calculate the MD5 hash for the given resource |
static java.lang.String |
camelCase(java.lang.String... args)
|
static java.lang.String |
camelCaseWithSeparators(java.lang.String text,
java.lang.String separators)
Returns the camelCase result after using the provided separators array to split the string into words. |
static boolean |
compare(java.lang.String s1,
java.lang.String s2,
int from,
int to)
Compares two Strings between the given chars |
static java.lang.String |
dasherize(java.lang.String text)
Converts a camelCase string to a dash-separated one. |
static java.lang.String |
generateIdentifier(java.lang.String text)
Transforms a text into an identifier candidate to be used in RESTful URLs. |
static boolean |
hasDigits(java.lang.String s)
|
static boolean |
hasProtocolPrefix(java.lang.StringBuilder uri)
Return true if the StringBuilder passed as parameter starts with a known web prefix. |
static java.lang.String |
numberToAlpha(long number)
Convert a number into its (shorter) alphanumeric representation using Base58 chars ([0-9a-zA-Z] omitting 0, O, I and 1) |
static java.lang.String |
separate(java.lang.String text,
char separator)
Converts a camelCase string to a separated one. |
static java.lang.String |
toMD5(java.lang.String text)
|
static java.lang.String |
toString(java.security.MessageDigest md)
Transform a MessageDigest instance into its string representation |
Methods inherited from class org.apache.commons.lang.StringUtils |
---|
abbreviate, abbreviate, capitalise, capitaliseAllWords, capitalize, center, center, center, chomp, chomp, chompLast, chompLast, chop, chopNewline, clean, concatenate, contains, contains, containsAny, containsAny, containsIgnoreCase, containsNone, containsNone, containsOnly, containsOnly, countMatches, defaultIfEmpty, defaultString, defaultString, deleteSpaces, deleteWhitespace, difference, endsWith, endsWithIgnoreCase, equals, equalsIgnoreCase, escape, getChomp, getCommonPrefix, getLevenshteinDistance, getNestedString, getNestedString, getPrechomp, indexOf, indexOf, indexOf, indexOf, indexOfAny, indexOfAny, indexOfAny, indexOfAnyBut, indexOfAnyBut, indexOfDifference, indexOfDifference, isAlpha, isAlphanumeric, isAlphanumericSpace, isAlphaSpace, isAsciiPrintable, isBlank, isEmpty, isNotBlank, isNotEmpty, isNumeric, isNumericSpace, isWhitespace, join, join, join, join, join, join, join, join, join, lastIndexOf, lastIndexOf, lastIndexOf, lastIndexOf, lastIndexOfAny, left, leftPad, leftPad, leftPad, length, lowerCase, mid, ordinalIndexOf, overlay, overlayString, prechomp, remove, remove, removeEnd, removeEndIgnoreCase, removeStart, removeStartIgnoreCase, repeat, replace, replace, replaceChars, replaceChars, replaceEach, replaceEachRepeatedly, replaceOnce, reverse, reverseDelimited, reverseDelimitedString, right, rightPad, rightPad, rightPad, split, split, split, split, splitByCharacterType, splitByCharacterTypeCamelCase, splitByWholeSeparator, splitByWholeSeparator, splitByWholeSeparatorPreserveAllTokens, splitByWholeSeparatorPreserveAllTokens, splitPreserveAllTokens, splitPreserveAllTokens, splitPreserveAllTokens, splitPreserveAllTokens, startsWith, startsWithIgnoreCase, strip, strip, stripAll, stripAll, stripEnd, stripStart, stripToEmpty, stripToNull, substring, substring, substringAfter, substringAfterLast, substringBefore, substringBeforeLast, substringBetween, substringBetween, substringsBetween, swapCase, trim, trimToEmpty, trimToNull, uncapitalise, uncapitalize, upperCase |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public StringUtils()
Method Detail |
---|
public static void addReplaceChars(char from, char to, char replacement)
public static void addReplaceChars(char from, char replacement)
public static java.lang.String camelCase(java.lang.String... args)
public static java.lang.String camelCaseWithSeparators(java.lang.String text, java.lang.String separators)
public static boolean hasProtocolPrefix(java.lang.StringBuilder uri)
public static boolean compare(java.lang.String s1, java.lang.String s2, int from, int to)
s1
- s2
- from
- the start index, inclusiveto
- the end index, exclusive
public static boolean hasDigits(java.lang.String s)
public static java.lang.String toMD5(java.lang.String text)
public static java.lang.String calculateMD5(byte[] text)
text
- the text to hash
public static java.lang.String toString(java.security.MessageDigest md)
MessageDigest
instance into its string representation
md
- the message digest to process
public static java.lang.String calculateMD5(org.springframework.core.io.Resource resource) throws java.io.IOException
resource
- the resource to hash
java.io.IOException
public static java.lang.String dasherize(java.lang.String text)
text
- the text to transform
public static java.lang.String separate(java.lang.String text, char separator)
text
- the text to transformseparator
- the separator character to use
public static java.lang.String generateIdentifier(java.lang.String text)
text
- the text to transform
java.lang.IllegalArgumentException
- if the provided text cannot generate a valid identifier (that
is, the generated identifier is empty or is '-')public static java.lang.String numberToAlpha(long number)
number
- the number to transform
public static long alphaToNumber(java.lang.String text)
text
- the alphanumeric representation
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES All Classes | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |