| java.lang.Object org.eclipse.ui.internal.quickaccess.CamelUtil
CamelUtil | public class CamelUtil (Code) | | Utility methods for camel case style matching.
since: 3.3 |
Method Summary | |
public static String | getCamelCase(String s) Returns a lowercase string consisting of all initials of the words in the
given String. | public static int[][] | getCamelCaseIndices(String s, int start, int length) Return an array with start/end indices for the characters used for camel
case matching, ignoring the first (start) many camel case characters. | public static int | getNextCamelIndex(String s, int index) Returns the next index to be used for camel case matching. | public static boolean | isSeparatorForCamelCase(char c) Returns true if the given character is to be considered a separator
for camel case matching purposes. |
getCamelCase | public static String getCamelCase(String s)(Code) | | Returns a lowercase string consisting of all initials of the words in the
given String. Words are separated by whitespace and other special
characters, or by uppercase letters in a word like CamelCase.
Parameters: s - the string a lowercase string containing the first character of every wordinthe given string. |
getCamelCaseIndices | public static int[][] getCamelCaseIndices(String s, int start, int length)(Code) | | Return an array with start/end indices for the characters used for camel
case matching, ignoring the first (start) many camel case characters.
For example, getCamelCaseIndices("some CamelCase", 1, 2) will return
{{5,5},{10,10}}.
Parameters: s - the source string Parameters: start - how many characters of getCamelCase(s) should be ignored Parameters: length - for how many characters should indices be returned an array of length start |
getNextCamelIndex | public static int getNextCamelIndex(String s, int index)(Code) | | Returns the next index to be used for camel case matching.
Parameters: s - the string Parameters: index - the index the next index, or -1 if not found |
isSeparatorForCamelCase | public static boolean isSeparatorForCamelCase(char c)(Code) | | Returns true if the given character is to be considered a separator
for camel case matching purposes.
Parameters: c - the character true if the character is a separator |
|
|