Docjar: A Java Source and Docuemnt Enginecom.*    java.*    javax.*    org.*    all    new    plug-in

Quick Search    Search Deep

com.maddyhome.idea.vim.helper
Class CharacterHelper  view CharacterHelper download CharacterHelper.java

java.lang.Object
  extended bycom.maddyhome.idea.vim.helper.CharacterHelper

public class CharacterHelper
extends java.lang.Object

This helper class is used when working with various character level operations


Field Summary
static char CASE_LOWER
           
static char CASE_TOGGLE
           
static char CASE_UPPER
           
static int TYPE_CHAR
           
static int TYPE_PUNC
           
static int TYPE_SPACE
           
 
Constructor Summary
CharacterHelper()
           
 
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
 

Field Detail

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
Constructor Detail

CharacterHelper

public CharacterHelper()
Method Detail

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