public static String reverse(String self)
provides a reverse() method for String.Note
While this class contains many 'public' static methods, it is primarily regarded as an internal class (its internal package name suggests this also). We value backwards compatibility of these methods when used within Groovy but value less backwards compatibility at the Java method call level. I.e. future versions of Groovy may remove or move a method call in this file but would normally aim to keep the method available from within Groovy.
| Modifier and Type | Class and Description |
|---|---|
| private static class | |
| private static class | |
| private static class | StringGroovyMethods.ReplaceState
Helper class used by |
| private static class |
| Modifier and Type | Field and Description |
|---|---|
| pack-priv static String |
| Access | Constructor and Description |
|---|---|
| public |
| Modifier and Type | Method and Description |
|---|---|
| public static StringBuilder | Returns: the StringBuildera StringBuilder sb, GStringImpl a GStringImpl gs)Append the GString to the StringBuilder using a more efficient approach than Java's default approach for a CharSequence. |
| public static boolean | Returns: the boolean valuethe character sequence chars)Coerces a CharSequence to a boolean value. |
| public static boolean | |
| public static <T> T | Returns: the converted objecta CharSequence self, final Class<T> the desired class c)Provides a method to perform custom 'dynamic' type conversion
to the given class using the |
| public static <T> T | Returns: the converted objecta GString self, final Class<T> the desired class c)Converts the GString to a File, or delegates to the default
|
| public static <T> T | |
| public static Pattern | Returns: the regular expression patterna String to convert into a regular expression self)Turns a CharSequence into a regular expression Pattern. |
| public static String | Returns: A String containing the capitalized toString() of the CharSequenceThe CharSequence to capitalize self)Convenience method to capitalize the first letter of a CharSequence (typically the first letter of a word). |
| public static String | Returns: the centered toString() of this CharSequence with padded characters around ita CharSequence object self, final Number the total minimum number of characters of the result numberOfChars)Pads a CharSequence to a minimum length specified by |
| public static String | Returns: the centered toString() of this CharSequence with padded characters around ita CharSequence object self, final Number the total minimum number of characters of the resulting CharSequence numberOfChars, final CharSequence the characters used for padding padding)Pad a CharSequence to a minimum length specified by |
| public static String | Returns: A new string in which all characters that require escaping have been replaced with the corresponding replacements as determined by thetransform Closure.the original String self, final Closure<String> transform)Iterates through this String a character at a time collecting either the original character or a transformed replacement String. |
| public static String | Returns: A new string in which all characters that require escaping have been replaced with the corresponding replacements as determined by thetransform function.the original String self, final List<Function<Character, Optional<String>>> one or more transforms which potentially convert a single character to a transformed string transforms)Iterates through this String a character at a time collecting either the original character or a transformed replacement String. |
| public static boolean | Returns: true if this CharSequence contains the given texta CharSequence self, final CharSequence the CharSequence to look for text)Provides an implementation of contains() like |
| public static boolean | Returns: true if the character sequence represented by the argument exists in this CharSequence
ignoring the case considerations. false otherwise. Returns false if the argument is nullthe original CharSequence self, final CharSequence CharSequence being checked against this searchString)Checks whether this CharSequence contains the |
| public static int | Returns: the number of occurrences of the given CharSequence inside this CharSequencea CharSequence self, final CharSequence a sub CharSequence text)Counts the number of occurrences of a sub CharSequence. |
| public static String | Returns: the denormalized toString() of this CharSequencea CharSequence object self)Return a CharSequence with lines (separated by LF, CR/LF, or CR) terminated by the platform specific line separator. |
| public static CharSequence | Returns: a CharSequence consisting of all characters except the firstnum ones,
or else an empty String, if this CharSequence has less than num characters.the original CharSequence self, final int the number of characters to drop from this String num)Drops the given number of chars from the head of this CharSequence if they are available. |
| public static String | Returns: a String consisting of all characters except the firstnum ones,
or else an empty String, if the toString() of this GString has less than num characters.the original GString self, final int the number of characters to drop from this GString num)A GString variant of the equivalent CharSequence method. |
| public static String | Returns: a String consisting of all characters except the firstnum ones,
or else an empty String, if the String has less than num characters.the original String self, final int the number of characters to drop from this String num)A String variant of the equivalent CharSequence method. |
| public static CharSequence | Returns: CharSequence after removing the rightnum chars and empty of the num is greater than the
length of the CharSequencethe original CharSequence self, final int number of characters num)Returns new CharSequence after removing the right |
| public static String | Returns: String after removing the rightnum chars and empty of the num is greater than the
length of the CharSequencethe original CharSequence self, final int number of characters num)A String variant of the equivalent CharSequence method |
| public static String | Returns: String after removing the rightnum chars and empty of the num is greater than the
length of the CharSequencethe original CharSequence self, final int number of characters num)A GString variant of the equivalent CharSequence method |
| public static String | Returns: the shortest suffix of the given CharSequence such that the given closure condition evaluates to true for each element dropped from the front of the CharSequencethe original CharSequence self, final Closure<V> the closure that while continuously evaluating to true will cause us to drop elements from
the front of the original CharSequence condition)Creates a suffix of the given CharSequence by dropping as many characters as possible from the front of the original CharSequence such that calling the given closure condition evaluates to true when passed each of the dropped characters. |
| public static String | Returns: the shortest suffix of the given GString such that the given closure condition evaluates to true for each element dropped from the front of the CharSequencethe original GString self, final Closure<V> the closure that while continuously evaluating to true will cause us to drop elements from
the front of the original GString condition)A GString variant of the equivalent CharSequence method. |
| public static CharSequence | |
| public static <T> T | Returns: the last value returned by the closurea CharSequence self, final Closure<T> a closure closure)Iterates through this CharSequence line by line. |
| public static <T> T | Returns: the last value returned by the closurea CharSequence self, final int the line number value used for the first line (default is 1, set to 0 to start counting from 0) firstLine, final Closure<T> a closure (arg 1 is line, optional arg 2 is line number) closure)Iterates through this CharSequence line by line. |
| public static <T extends CharSequence> T | Returns: the source CharSequencethe source CharSequence self, final CharSequence a Regex CharSequence regex, final Closure<V> a closure with one parameter or as many parameters as groups closure)Processes each regex group matched substring of the given CharSequence. |
| public static <T extends CharSequence> T | |
| public static String | |
| public static String | |
| public static boolean | Returns: true if this CharSequence ends with any specified suffixesthe suffixes. suffixes)Tests if this CharSequence ends with any specified suffixes. |
| public static boolean | Returns: true if the character sequence represented by the argument is a suffix of this CharSequence
ignoring the case considerations. false otherwise. Returns false if the argument is nullthe original CharSequence self, final CharSequence CharSequence bring checked against this searchString)Checks whether this CharSequence ends with the |
| public static String | Returns: The expanded toString() of this CharSequenceA CharSequence to expand self)Expands all tabs into spaces with tabStops of size 8. |
| public static String | Returns: The expanded toString() of this CharSequenceA CharSequence to expand self, final int The number of spaces a tab represents tabStop)Expands all tabs into spaces. |
| public static String | Returns: The expanded toString() of this CharSequenceA line to expand self, final int The number of spaces a tab represents tabStop)Expands all tabs into spaces. |
| public static String | Returns: a String containing the matched portion, or null if the regex doesn't matcha CharSequence self, final CharSequence the capturing regex regex)Finds the first occurrence of a regular expression String within a String. |
| public static String | Returns: a String containing the result of calling the closure (calling toString() if needed), or null if the regex pattern doesn't matcha CharSequence self, final CharSequence the capturing regex CharSequence regex, final Closure<V> the closure that will be passed the full match, plus each of the capturing groups (if any) closure)Returns the result of calling a closure with the first occurrence of a regular expression found within a CharSequence. |
| public static String | Returns: a String containing the matched portion, or null if the regex pattern doesn't matcha CharSequence self, final Pattern the compiled regex Pattern pattern)Finds the first occurrence of a compiled regular expression Pattern within a String. |
| public static String | Returns: a String containing the result of calling the closure (calling toString() if needed), or null if the regex pattern doesn't matcha CharSequence self, final Pattern the compiled regex Pattern pattern, final Closure<V> the closure that will be passed the full match, plus each of the capturing groups (if any) closure)Returns the result of calling a closure with the first occurrence of a compiled regular expression found within a String. |
| public static List | Returns: a List containing all full matches of the regex within the CharSequence, an empty list will be returned if there are no matchesa CharSequence self, final CharSequence the capturing regex CharSequence regex)Returns a (possibly empty) list of all occurrences of a regular expression (provided as a CharSequence) found within a CharSequence. |
| public static <T> List | Returns: a List containing all results from calling the closure with each full match (and potentially capturing groups) of the regex within the CharSequence, an empty list will be returned if there are no matchesa CharSequence self, final CharSequence the capturing regex CharSequence regex, final Closure<T> will be passed the full match plus each of the capturing groups (if any) closure)Finds all occurrences of a regular expression string within a CharSequence. |
| public static List | Returns: a List containing all full matches of the Pattern within the CharSequence, an empty list will be returned if there are no matchesa CharSequence self, final Pattern the compiled regex Pattern pattern)Returns a (possibly empty) list of all occurrences of a regular expression (in Pattern format) found within a CharSequence. |
| public static <T> List | Returns: a List containing all results from calling the closure with each full match (and potentially capturing groups) of the regex pattern within the CharSequence, an empty list will be returned if there are no matchesa CharSequence self, final Pattern the compiled regex Pattern pattern, final Closure<T> will be passed the full match plus each of the capturing groups (if any) closure)Finds all occurrences of a compiled regular expression Pattern within a CharSequence. |
| private static int | |
| public static String | Returns: a String consisting of the characters at the given indicesa CharSequence self, final Collection<E> a Collection of indices indices)Selects a List of characters from a CharSequence using a Collection to identify the indices to be selected. |
| public static String | Returns: the empty Stringa CharSequence self, final EmptyRange<T extends Comparable<T>> an EmptyRange range)Supports the range subscript operator for CharSequence or StringBuffer with EmptyRange |
| public static CharSequence | Returns: the Character at the given indexa CharSequence self, int the index of the Character to get index)Supports the subscript operator for CharSequence. |
| public static String | |
| public static CharSequence | Returns: the subsequence CharSequencea CharSequence self, final IntRange an IntRange range)Supports the range subscript operator for CharSequence with IntRange. |
| public static String | |
| public static CharSequence | Returns: the subsequence CharSequencea CharSequence self, final Range<T extends Comparable<T>> a Range range)Supports the range subscript operator for CharSequence. |
| public static String | Returns: the String of characters corresponding to the provided rangea GString self, final Range<T extends Comparable<T>> a Range range)Supports the range subscript operator for GString. |
| public static List | Returns: a String of the values at the given indicesa Matcher self, Collection<E> a Collection of indices indices)Selects a List of values from a Matcher using a Collection to identify the indices to be selected. |
| public static Object | |
| public static String | |
| public static String | |
| public static String | Returns: a substring corresponding to the Rangea String self, final Range<T extends Comparable<T>> a Range range)Supports the range subscript operator for String. |
| public static char[] | Returns: an array of charactersa CharSequence self)Converts the given CharSequence into an array of characters. |
| public static int | |
| private static List | |
| private static String | |
| private static String | Returns: replacement correspond replacement for a matchthe matcher object used for matching matcher, final Closure<?> specified with replaceAll() to get replacement closure)Gets a replacement corresponding to the matched pattern for |
| private static int | guessCapacity(final int capacity, final Map<CharSequence, CharSequence> replacements)
Crude heuristic for setting the created StringBuilder capacity if not supplied: If at least one replacement text is bigger than the original text use a capacity 50% larger than the original; otherwise, use the original size. |
| public static boolean | |
| public static boolean | Returns: true If all characters are whitespace charactersThe CharSequence to check the characters in self)Returns true if a CharSequence only contains whitespace characters. |
| public static Boolean | |
| public static boolean | Returns: true if the CharSequence can be parseda CharSequence self)Determines if a CharSequence can be parsed as a BigDecimal. |
| public static boolean | Returns: true if the CharSequence can be parseda CharSequence self)Determines if a CharSequence can be parsed as a BigInteger. |
| public static boolean | Returns: true if this CharSequence is blankTests if this CharSequence is blank. |
| public static boolean | Returns: true if the switchValue's toString() equals the caseValuethe case value caseValue, final Object the switch value switchValue)'Case' implementation for a CharSequence, which uses equals between the toString() of the caseValue and the switchValue. |
| public static boolean | Returns: true if the switchValue is deemed to match the caseValuethe case value caseValue, final Object the switch value switchValue)'Case' implementation for the |
| public static boolean | Returns: true if the CharSequence can be parseda CharSequence self)Determines if a CharSequence can be parsed as a Double. |
| public static boolean | Returns: true if the CharSequence can be parseda CharSequence self)Determines if a CharSequence can be parsed as a Float. |
| public static boolean | Returns: true if the CharSequence can be parseda CharSequence self)Determines if a CharSequence can be parsed as an Integer. |
| public static boolean | Returns: true if the CharSequence can be parseda CharSequence self)Determines if a CharSequence can be parsed as a Long. |
| public static boolean | Returns: true if the CharSequence can be parseda CharSequence self)Determines if a CharSequence can be parsed as a Number. |
| public static Iterator | Returns: an Iterator for a Matchera Matcher object self)Returns an |
| public static StringBuilder | Returns: a StringBuilder built from this CharSequencea CharSequence self, final Object an Object value)Overloads the left shift operator to provide an easy way to append multiple objects as string representations to a CharSequence. |
| public static StringBuffer | |
| public static StringBuffer | Returns: the StringBuffer on which this operation was invokeda StringBuffer self, final Object a value to append value)Overloads the left shift operator to provide an easy way to append multiple objects as string representations to a StringBuffer. |
| public static StringBuilder | Returns: the original StringBuildera StringBuilder self, final Object an Object value)Overloads the left shift operator to provide syntactic sugar for appending to a StringBuilder. |
| public static boolean | Returns: true if the CharSequence matchesthe CharSequence that is to be matched self, final Pattern the regex Pattern to which the string of interest is to be matched pattern)Determines if a CharSequence matches the given regular expression. |
| public static boolean | Returns: true if more input to the String could make the matcher match the associated pattern, false otherwise.the Matcher self)Given a matcher that matches a string against a pattern, returns true when the string matches the pattern or if a longer string, could match the pattern. |
| public static String | Returns: a String containing the original minus the part to be removeda CharSequence self, final Object an object representing the part to remove target)Removes a part of a CharSequence by replacing the first occurrence of target within self with empty string and returns the result. |
| public static String | Returns: a String minus the part to be removeda String self, final Pattern a Pattern representing the part to remove pattern)Removes a part of a CharSequence. |
| public static String | Returns: a String composed of a repetitiona CharSequence to be repeated self, final Number the number of times the CharSequence should be repeated factor)Repeats a CharSequence a certain number of times. |
| public static String | Returns: a value obtained by incrementing the toString() of the CharSequencea CharSequence self)Overloads the |
| private static void | nextMatch(final String text, final StringGroovyMethods.
Helper method to find the next match for the replace method. |
| public static String | Returns: the normalized toString() for the CharSequencea CharSequence object self)Returns a String with linefeeds and carriage returns normalized to linefeeds. |
| public static String | Returns: the CharSequence padded to the left as a Stringa CharSequence object self, final Number the total minimum number of characters of the resulting CharSequence numberOfChars)Pads a CharSequence to a minimum length specified by |
| public static String | Returns: the CharSequence padded to the left as a Stringa CharSequence object self, final Number the total minimum number of characters of the resulting CharSequence numberOfChars, final CharSequence the characters used for padding padding)Pads a CharSequence to a minimum length specified by |
| public static String | Returns: the CharSequence padded to the right as a Stringa CharSequence object self, final Number the total minimum number of characters of the resulting string numberOfChars)Pads a CharSequence to a minimum length specified by |
| public static String | Returns: the CharSequence padded to the right as a Stringa CharSequence object self, final Number the total minimum number of characters of the resulting CharSequence numberOfChars, final CharSequence the characters used for padding padding)Pads a CharSequence to a minimum length specified by |
| public static String | Returns: the original toString() of the CharSequence with the object appendeda CharSequence left, final Object any Object right)Appends the String representation of the given operand to this CharSequence. |
| public static String | |
| public static String | Returns: the new string with the object appendeda String left, final CharSequence any CharSequence right)Appends the String representation of the given operand to this string. |
| public static String | Returns: a Stringa StringBuffer left, final String a String right)Appends a String to this StringBuffer. |
| public static String | Returns: a String with a decremented character at the enda CharSequence self)Overloads the |
| public static void | putAt(final StringBuffer
a StringBuffer self, final EmptyRange<T extends Comparable<T>> a Range range, final Object the object that's toString() will be inserted value)Supports the range subscript operator for StringBuffer. |
| public static void | putAt(final StringBuffer
a StringBuffer self, final IntRange a Range range, final Object the object that's toString() will be inserted value)Supports the range subscript operator for StringBuffer. |
| public static List | Returns: a list of linesa CharSequence object self)Returns the lines of a CharSequence as a List of String. |
| public static String | Returns: a String formed from the provided CharSequence after performing all of the replacementsa CharSequence self, final Map<CharSequence, CharSequence> a map of before (key) and after (value) pairs processed in the natural order of the map replacements)Replaces all occurrences of replacement CharSequences (supplied via a map) within a provided CharSequence. |
| public static String | Returns: a String formed from the provided CharSequence after performing all of the replacementsa CharSequence self, final int an optimization parameter, set to size after replacements or a little larger to avoid resizing overheads capacity, final Map<CharSequence, CharSequence> a map of before (key) and after (value) pairs processed in the natural order of the map replacements)Replaces all occurrences of replacement CharSequences (supplied via a map) within a provided CharSequence with control over the internally created StringBuilder's capacity. |
| public static String | Returns: the toString() of the CharSequence with content replaceda CharSequence self, final CharSequence the capturing regex regex, final CharSequence the string to be substituted for each match replacement)Replaces each substring of this CharSequence that matches the given regular expression with the given replacement. |
| public static String | Returns: the toString() of the CharSequence with content replaceda CharSequence self, final CharSequence the capturing regex regex, final Closure<V> the closure to apply on each captured group closure)Replaces all occurrences of a captured group by the result of calling a closure on that text. |
| public static String | Returns: the toString() of the CharSequence with content replacedthe CharSequence that is to be matched self, final Pattern the regex Pattern to which the CharSequence of interest is to be matched pattern, final CharSequence the CharSequence to be substituted for the first match replacement)Replaces all substrings of a CharSequence that match the given compiled regular expression with the given replacement. |
| public static String | Returns: the toString() of the CharSequence with replaced contenta CharSequence self, final Pattern the capturing regex Pattern pattern, final Closure<V> the closure to apply on each captured group closure)Replaces all occurrences of a captured group by the result of a closure call on that text. |
| public static String | replaceFirst(final CharSequence
a CharSequence self, final CharSequence the capturing regex regex, final CharSequence the CharSequence to be substituted for each match replacement)Replaces the first substring of this CharSequence that matches the given regular expression with the given replacement. |
| public static String | replaceFirst(final CharSequence
a CharSequence self, final CharSequence the capturing regex regex, final Closure<V> the closure to apply on the first captured group closure)Replaces the first occurrence of a captured group by the result of a closure call on that text. |
| public static String | replaceFirst(final CharSequence
the CharSequence that is to be matched self, final Pattern the regex Pattern to which the CharSequence of interest is to be matched pattern, final CharSequence the CharSequence to be substituted for the first match replacement)Replaces the first substring of a CharSequence that matches the given compiled regular expression with the given replacement. |
| public static String | replaceFirst(final CharSequence
a CharSequence self, final Pattern the capturing regex Pattern pattern, final Closure<V> the closure to apply on the first captured group closure)Replaces the first occurrence of a captured group by the result of a closure call on that text. |
| public static String | Returns: a new String with all the characters reversed.a CharSequence self)Creates a String which is the reverse (backwards) of this CharSequence |
| public static void | |
| public static int | Returns: the length of the CharSequencea CharSequence self)Provides the standard Groovy |
| public static long | |
| public static int | |
| public static int | Returns: the length of the StringBuffera StringBuffer self)
Deprecated
Provides the standard Groovy size() method for StringBuffer.
|
| public static String[] | Returns: String[] result of splitthe CharSequence to split self)Splits a CharSequence (with whitespace as delimiter). |
| public static <T> T | Returns: the last value returned by the closurea CharSequence self, final CharSequence the delimiting regular expression regex, final Closure<T> a closure closure)Iterates through the given CharSequence line by line, splitting each line using the given regex delimiter. |
| public static <T> T | Returns: the last value returned by the closurea CharSequence self, final Pattern the regular expression Pattern for the delimiter pattern, final Closure<T> a closure closure)Iterates through the given CharSequence line by line, splitting each line using the given separator Pattern. |
| public static boolean | Returns: true if this CharSequence starts with any specified prefixes.the prefixes. prefixes)Tests if this CharSequence starts with any specified prefixes. |
| public static boolean | Returns: true if the character sequence represented by the argument is a prefix of this CharSequence
ignoring the case considerations. false otherwise. Returns false if the argument is nullthe original CharSequence self, final CharSequence CharSequence being checked against this searchString)Checks whether this CharSequence starts with the |
| public static String | Returns: the strippedtoString() of the CharSequencea CharSequence to strip the leading spaces from self)Strips leading spaces from every line in a CharSequence. |
| public static String | stripIndent(final CharSequence
The CharSequence to strip the leading spaces from self, final boolean force groovy behavior to avoid conflicts with Java13's stripIndent forceGroovyBehavior)Same logic as |
| public static String | Returns: the stripped StringThe CharSequence to strip the characters from self, final int The number of characters to strip numChars)Strips |
| private static String | |
| public static String | Returns: the stripped StringThe CharSequence to strip the margin from self)Strips leading whitespace/control characters followed by '|' from every line in a CharSequence. |
| public static String | Returns: the stripped StringThe CharSequence to strip the margin from self, final char Any character that serves as margin delimiter marginChar)Strips leading whitespace/control characters followed by |
| public static String | Returns: the stripped CharSequenceThe CharSequence to strip the margin from self, final CharSequence Any character that serves as margin delimiter marginChar)Strips leading whitespace/control characters followed by |
| private static String | |
| public static CharSequence | Returns: a CharSequence consisting of the firstnum chars,
or else the whole CharSequence if it has less than num elements.the original CharSequence self, final int the number of chars to take from this CharSequence num)Returns the first |
| public static String | |
| public static String | |
| public static CharSequence | Returns: CharSequence that is after the given searchString and empty string if it does not existthe original CharSequence self, final CharSequence CharSequence that is searched in this CharSequence searchString)Returns the |
| public static String | Returns: String that is after the given searchString and empty string if it does not existthe original CharSequence self, final CharSequence String that is searched in this CharSequence searchString)A String variant of the equivalent CharSequence method |
| public static String | Returns: String that is after the given searchString and empty string if it does not existthe original CharSequence self, final CharSequence CharSequence that is searched in this CharSequence searchString)A GString variant of the equivalent CharSequence method |
| public static CharSequence | Returns: CharSequence that is before the given searchStringthe original CharSequence self, final CharSequence CharSequence that is searched in this CharSequence searchString)Returns the |
| public static String | Returns: String that is before the given searchStringthe original CharSequence self, final String CharSequence that is searched in this CharSequence searchString)A GString variant of the equivalent CharSequence method |
| public static String | Returns: String that is before the given searchStringthe original CharSequence self, final String CharSequence that is searched in this CharSequence searchString)A String variant of the equivalent CharSequence method |
| public static CharSequence | Returns: the CharSequence that is in between the given two CharSequences and empty if the unavailable inputs are giventhe original CharSequence self, final CharSequence beginning of search from, final CharSequence end of search to)Returns the CharSequence that is in between the first occurrence of the given |
| public static String | Returns: String that is in between the given two CharSequences and empty if the unavailable inputs are giventhe original CharSequence self, final CharSequence beginning of search from, final CharSequence end of search to)A String variant of the equivalent CharSequence method |
| public static String | Returns: String that is in between the given two CharSequences and empty if the unavailable inputs are giventhe original CharSequence self, final CharSequence beginning of search from, final CharSequence end of search to)A GString variant of the equivalent CharSequence method |
| public static CharSequence | Returns: CharSequence between the 2 subsequentenclosure stringsOriginal CharSequence self, final CharSequence Enclosure CharSequence enclosure)Takes the characters between the first occurrence of the two subsequent |
| public static String | Returns: String between the 2 subsequentenclosure stringsOriginal String self, final CharSequence Enclosure CharSequence enclosure)A String variant of the equivalent CharSequence method |
| public static String | Returns: String between the 2 subsequentenclosure stringsOriginal GString self, final CharSequence Enclosure CharSequence enclosure)A GString variant of the equivalent CharSequence method |
| public static CharSequence | Returns: the CharSequence that is in between the given the nth (specified by occurrence) pair offrom and to CharSequences and empty if the unavailable inputs are given.the original CharSequence self, final CharSequence beginning of search from, final CharSequence end of search to, final int nth occurrence that is to be returned. 0 represents first one occurrence)Returns the CharSequence that is in between the given the nth (specified by occurrence) pair of
|
| public static String | Returns: the String that is in between the given nth (specified by occurrence) pair offrom and to CharSequences and empty if the unavailable inputs are given.the original String self, final CharSequence beginning of search from, final CharSequence end of search to, final int nth occurrence that is to be returned. 0 represents first one occurrence)A String variant of the equivalent CharSequence method |
| public static String | Returns: the String that is in between the given nth (specified by occurrence) pair offrom and to CharSequences and empty if the unavailable inputs are given.the original GString self, final CharSequence beginning of search from, final CharSequence end of search to, final int nth occurrence that is to be returned. 0 represents first one occurrence)A GString variant of the equivalent CharSequence method |
| public static CharSequence | Returns: CharSequence between the nth occurrence of pair ofenclosure stringsOriginal CharSequence self, final CharSequence Enclosure CharSequence enclosure, final int nth occurrence being returned occurrence)Takes the characters between nth (specified by occurrence) pair of |
| public static String | Returns: String between the nth occurrence of pair ofenclosure stringsOriginal String self, final CharSequence Enclosure CharSequence enclosure, int nth occurrence being returned occurrence)A String variant of the equivalent CharSequence method |
| public static String | Returns: String between the nth occurrence of pair ofenclosure stringsOriginal GString self, final CharSequence Enclosure CharSequence enclosure, final int nth occurrence being returned occurrence)A GString variant of the equivalent CharSequence method |
| public static CharSequence | Returns: a CharSequence consisting of the lastnum chars,
or else the whole CharSequence if it has less than num elements.the original CharSequence self, final int the number of chars to take from this CharSequence from the right num)Returns the last |
| public static String | Returns: a String consisting of the lastnum chars,
or else the whole CharSequence if it has less than num elements.the original CharSequence self, final int the number of chars to take from this CharSequence from the right num)A GString variant of the equivalent CharSequence method |
| public static String | Returns: a String consisting of the lastnum chars,
or else the whole GString if it has less than num elements.the original GString self, final int the number of chars to take from this GString from the right num)A String variant of the equivalent CharSequence method |
| public static String | Returns: a prefix of elements in the CharSequence where each element passed to the given closure evaluates to truethe original CharSequence self, final Closure<V> the closure that must evaluate to true to continue taking elements condition)Returns the longest prefix of this CharSequence where each element passed to the given closure evaluates to true. |
| public static String | Returns: a prefix of elements in the GString where each element passed to the given closure evaluates to truethe original GString self, final Closure<V> the closure that must evaluate to true to continue taking elements condition)A GString variant of the equivalent GString method. |
| public static CharSequence | |
| public static BigDecimal | Returns: a BigDecimala CharSequence self)Parses a CharSequence into a BigDecimal |
| public static BigInteger | Returns: a BigIntegera CharSequence self)Parses a CharSequence into a BigInteger |
| public static Boolean | |
| public static Character | Returns: the first Charactera String self)Converts the given string into a Character object using the first character in the string. |
| public static Double | Returns: a Doublea CharSequence self)Parses a CharSequence into a Double. |
| public static Float | |
| public static Integer | Returns: an Integera CharSequence self)Parses a CharSequence into an Integer. |
| public static List | Returns: a List of tokensa CharSequence self)Tokenizes a CharSequence (with a whitespace as the delimiter). |
| public static List | Returns: a List of tokensa CharSequence self, final Character the delimiter delimiter)Tokenizes a CharSequence based on the given character delimiter. |
| public static List | Returns: a List of tokensa CharSequence self, final CharSequence the delimiters delimiters)Tokenizes a CharSequence based on the given CharSequence. |
| public static List | Returns: a List of characters (a 1-character String)a CharSequence self)Converts the given CharSequence into a List of Strings of one character. |
| public static Long | |
| public static Set | Returns: a Set of unique characters (each a 1-character String)a CharSequence self)Converts the given CharSequence into a Set of unique Strings of one character. |
| public static Short | |
| public static String | Returns: The resulting translatedStringthe CharSequence that is to be translated self, final CharSequence the set of characters to translate from sourceSet, final CharSequence the set of replacement characters replacementSet)Translates a CharSequence by replacing characters from the sourceSet with characters from replacementSet. |
| public static String | Returns: A String containing the uncapitalized toString() of the CharSequenceThe CharSequence to uncapitalize self)Convenience method to uncapitalize the first letter of a CharSequence (typically the first letter of a word). |
| public static String | Returns: an unexpanded StringA CharSequence to unexpand self)Replaces sequences of whitespaces with tabs using tabStops of size 8. |
| public static String | Returns: an unexpanded StringA CharSequence to unexpand self, final int The number of spaces a tab represents tabStop)Replaces sequences of whitespaces with tabs. |
| public static String | Returns: an unexpanded StringA line to unexpand self, final int The number of spaces a tab represents tabStop)Replaces sequences of whitespaces with tabs within a line. |