类 CharSequenceUtil

java.lang.Object
tech.mhuang.pacebox.core.util.CharSequenceUtil

public class CharSequenceUtil extends Object

Operations on CharSequence that are null safe.

从以下版本开始:
3.0
作者:
mhuang
另请参阅:
  • 构造器详细资料

    • CharSequenceUtil

      public CharSequenceUtil()

      CharSequenceUtil instances should NOT be constructed in standard programming.

      This constructor is public to permit tools that require a JavaBean instance to operate.

  • 方法详细资料

    • subSequence

      public static CharSequence subSequence(CharSequence cs, int start)

      Returns a new CharSequence that is a subsequence of this sequence starting with the char value at the specified index.

      This provides the CharSequence equivalent to String.substring(int). The length (in char) of the returned sequence is length() - start, so if start == end then an empty sequence is returned.

      参数:
      cs - the specified subsequence, null returns null
      start - the start index, inclusive, valid
      返回:
      a new subsequence, may be null
      抛出:
      IndexOutOfBoundsException - if start is negative or if start is greater than length()