java.lang.Object
com.maddyhome.idea.vim.helper.CharacterHelper
- public class CharacterHelper
- extends java.lang.Object
This helper class is used when working with various character level operations
|
Method Summary |
static char |
changeCase(char ch,
char type)
Changes the case of the supplied character based on the supplied change type |
static int |
charType(char ch,
boolean skipPunc)
This returns the type of the supplied character. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
CASE_TOGGLE
public static final char CASE_TOGGLE
- See Also:
- Constant Field Values
CASE_UPPER
public static final char CASE_UPPER
- See Also:
- Constant Field Values
CASE_LOWER
public static final char CASE_LOWER
- See Also:
- Constant Field Values
TYPE_CHAR
public static final int TYPE_CHAR
- See Also:
- Constant Field Values
TYPE_PUNC
public static final int TYPE_PUNC
- See Also:
- Constant Field Values
TYPE_SPACE
public static final int TYPE_SPACE
- See Also:
- Constant Field Values
CharacterHelper
public CharacterHelper()
charType
public static int charType(char ch,
boolean skipPunc)
- This returns the type of the supplied character. The logic is as follows:
If the character is whitespace, TYPE_SPACE is returned.
If the punction is being skipped or the character is a letter, digit, or underscore, TYPE_CHAR
is returned.
Otherwise TYPE_PUNC is returned.
changeCase
public static char changeCase(char ch,
char type)
- Changes the case of the supplied character based on the supplied change type