Package org.apache.commons.lang3
Class CharSequenceUtils
java.lang.Object
org.apache.commons.lang3.CharSequenceUtils
Operations on 
CharSequence that are
 null safe.- Since:
- 3.0
- See Also:
- 
Constructor SummaryConstructors
- 
Method SummaryModifier and TypeMethodDescriptionstatic CharSequencesubSequence(CharSequence cs, int start) Returns a newCharSequencethat is a subsequence of this sequence starting with thecharvalue at the specified index.static char[]toCharArray(CharSequence source) Converts the given CharSequence to a char[].
- 
Constructor Details- 
CharSequenceUtilsDeprecated.TODO Make private in 4.0.CharSequenceUtilsinstances should NOT be constructed in standard programming.This constructor is public to permit tools that require a JavaBean instance to operate. 
 
- 
- 
Method Details- 
subSequenceReturns a newCharSequencethat is a subsequence of this sequence starting with thecharvalue at the specified index.This provides the CharSequenceequivalent toString.substring(int). The length (inchar) of the returned sequence islength() - start, so ifstart == endthen an empty sequence is returned.- Parameters:
- cs- the specified subsequence, null returns null
- start- the start index, inclusive, valid
- Returns:
- a new subsequence, may be null
- Throws:
- IndexOutOfBoundsException- if- startis negative or if- startis greater than- length()
 
- 
toCharArrayConverts the given CharSequence to a char[].- Parameters:
- source- the- CharSequenceto be processed.
- Returns:
- the resulting char array, never null.
- Since:
- 3.11
 
 
-