Package com.intellij.util.text
Class CharArrayUtil
- java.lang.Object
-
- com.intellij.util.text.CharArrayUtil
-
public class CharArrayUtil extends Object
-
-
Constructor Summary
Constructors Constructor Description CharArrayUtil()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static boolean
containLineBreaks(CharSequence seq)
static boolean
containLineBreaks(CharSequence seq, int fromOffset, int endOffset)
static boolean
containsOnlyWhiteSpaces(CharSequence chars)
static boolean
equals(char[] buffer1, int start1, int end1, char[] buffer2, int start2, int end2)
static char[]
fromSequence(CharSequence seq)
static char[]
fromSequenceStrict(CharSequence seq)
static char[]
fromSequenceWithoutCopying(CharSequence seq)
static void
getChars(CharSequence src, char[] dst, int dstOffset)
static void
getChars(CharSequence src, char[] dst, int dstOffset, int len)
static TextRange[]
getIndents(CharSequence charsSequence, int shift)
static int
indexOf(char[] buffer, String pattern, int fromIndex)
static int
indexOf(CharSequence buffer, CharSequence pattern, int fromIndex)
static int
indexOf(CharSequence buffer, CharSequence pattern, int fromIndex, int toIndex)
static int
lastIndexOf(char[] buffer, String pattern, int fromIndex)
static int
lastIndexOf(CharSequence buffer, String pattern, int fromIndex)
static boolean
regionMatches(char[] buffer, int offset, int bufferEnd, CharSequence s)
static boolean
regionMatches(CharSequence buffer, int offset, int bufferEnd, CharSequence s)
static boolean
regionMatches(CharSequence buffer, int offset, CharSequence s)
static int
shiftBackward(char[] buffer, int offset, String chars)
static int
shiftBackward(CharSequence buffer, int offset, String chars)
static int
shiftBackwardUntil(char[] buffer, int offset, String chars)
static int
shiftBackwardUntil(CharSequence buffer, int offset, String chars)
static int
shiftForward(char[] buffer, int offset, String chars)
static int
shiftForward(CharSequence buffer, int offset, String chars)
static int
shiftForwardCarefully(CharSequence buffer, int offset, String chars)
static int
shiftForwardUntil(char[] buffer, int offset, String chars)
static int
shiftForwardUntil(CharSequence buffer, int offset, String chars)
static boolean
subArraysEqual(char[] ca1, int startOffset1, int endOffset1, char[] ca2, int startOffset2, int endOffset2)
static byte[]
toByteArray(char[] chars)
static byte[]
toByteArray(char[] chars, int size)
-
-
-
Method Detail
-
getChars
public static void getChars(CharSequence src, char[] dst, int dstOffset)
-
getChars
public static void getChars(CharSequence src, char[] dst, int dstOffset, int len)
-
fromSequenceStrict
public static char[] fromSequenceStrict(CharSequence seq)
-
fromSequenceWithoutCopying
public static char[] fromSequenceWithoutCopying(CharSequence seq)
-
fromSequence
public static char[] fromSequence(CharSequence seq)
-
shiftForward
public static int shiftForward(CharSequence buffer, int offset, String chars)
-
shiftForwardCarefully
public static int shiftForwardCarefully(CharSequence buffer, int offset, String chars)
-
shiftForward
public static int shiftForward(char[] buffer, int offset, String chars)
-
shiftBackward
public static int shiftBackward(CharSequence buffer, int offset, String chars)
-
shiftBackward
public static int shiftBackward(char[] buffer, int offset, String chars)
-
shiftForwardUntil
public static int shiftForwardUntil(char[] buffer, int offset, String chars)
-
shiftForwardUntil
public static int shiftForwardUntil(CharSequence buffer, int offset, String chars)
-
shiftBackwardUntil
public static int shiftBackwardUntil(char[] buffer, int offset, String chars)
-
shiftBackwardUntil
public static int shiftBackwardUntil(CharSequence buffer, int offset, String chars)
-
regionMatches
public static boolean regionMatches(char[] buffer, int offset, int bufferEnd, CharSequence s)
-
regionMatches
public static boolean regionMatches(CharSequence buffer, int offset, int bufferEnd, CharSequence s)
-
regionMatches
public static boolean regionMatches(CharSequence buffer, int offset, CharSequence s)
-
equals
public static boolean equals(char[] buffer1, int start1, int end1, char[] buffer2, int start2, int end2)
-
indexOf
public static int indexOf(char[] buffer, String pattern, int fromIndex)
-
indexOf
public static int indexOf(CharSequence buffer, CharSequence pattern, int fromIndex)
-
indexOf
public static int indexOf(CharSequence buffer, CharSequence pattern, int fromIndex, int toIndex)
-
lastIndexOf
public static int lastIndexOf(CharSequence buffer, String pattern, int fromIndex)
-
lastIndexOf
public static int lastIndexOf(char[] buffer, String pattern, int fromIndex)
-
toByteArray
public static byte[] toByteArray(char[] chars) throws IOException
- Throws:
IOException
-
toByteArray
public static byte[] toByteArray(char[] chars, int size) throws IOException
- Throws:
IOException
-
containsOnlyWhiteSpaces
public static boolean containsOnlyWhiteSpaces(CharSequence chars)
-
subArraysEqual
public static boolean subArraysEqual(char[] ca1, int startOffset1, int endOffset1, char[] ca2, int startOffset2, int endOffset2)
-
getIndents
public static TextRange[] getIndents(CharSequence charsSequence, int shift)
-
containLineBreaks
public static boolean containLineBreaks(CharSequence seq)
-
containLineBreaks
public static boolean containLineBreaks(CharSequence seq, int fromOffset, int endOffset)
-
-