Class CodePointUtil
java.lang.Object
com.puppycrawl.tools.checkstyle.utils.CodePointUtil
Contains utility methods for code point.
- 
Constructor SummaryConstructors
- 
Method SummaryModifier and TypeMethodDescriptionstatic booleanTests if the unicode code points array ends with the specified suffix.static booleanhasWhitespaceBefore(int index, int... codePoints) Checks if the given code point array contains only whitespace up to specified index.static booleanisBlank(int... codePoints) Checks if given code point array is blank by either being empty, or contains only whitespace characters.static int[]stripTrailing(int... codePoints) Removes trailing whitespaces.
- 
Constructor Details- 
CodePointUtilprivate CodePointUtil()Stop instances being created.
 
- 
- 
Method Details- 
isBlankChecks if given code point array is blank by either being empty, or contains only whitespace characters.- Parameters:
- codePoints- The array of unicode code points of string to check.
- Returns:
- true if codePoints is blank.
 
- 
hasWhitespaceBeforeChecks if the given code point array contains only whitespace up to specified index.- Parameters:
- codePoints- array of Unicode code point of string to check
- index- index to check up to (exclusive)
- Returns:
- true if all code points preceding given index are whitespace
 
- 
stripTrailingRemoves trailing whitespaces.- Parameters:
- codePoints- array of unicode code points
- Returns:
- unicode code points array with trailing whitespaces removed
 
- 
endsWithTests if the unicode code points array ends with the specified suffix.- Parameters:
- suffix- the suffix
- codePoints- the array of unicode code points to check
- Returns:
- true, if the unicode code points array ends with provided suffix
 
 
-