|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.crosswire.jsword.book.SentenceUtil
public final class SentenceUtil
The SentenceUtil class provide utility functions for the various Books. It is not designed to be used outside of the book package, so using it outside of these bounds is at your own risk.
for license details.
The copyright to this program is held by it's authors.
Constructor Summary | |
---|---|
private |
SentenceUtil()
Ensure we can not be instantiated |
Method Summary | |
---|---|
static int |
firstLetter(String word)
Where is the first letter in this word |
static String[] |
getWords(String aSentence)
From a sentence get a list of words (in original order) without any punctuation, and all in lower case. |
static int |
lastLetter(String word)
Where is the last letter in this word |
static String[] |
stripPunctuation(String... words)
From a sentence get a list of words (in original order) without any punctuation, and all in lower case. |
static String |
stripPunctuationWord(String word)
Remove the punctuation from the ends of the word |
static String[] |
stripWords(String... words)
From a sentence get a list of words (in original order) without any punctuation, and all in lower case. |
static String |
stripWords(String first,
String last)
Remove the punctuation from the ends of the word. |
static String[] |
tokenize(String sentence)
Take a string and tokenize it using " " and "--" as delimiters into an Array of Strings. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
private SentenceUtil()
Method Detail |
---|
public static String[] tokenize(String sentence)
sentence
- The string to parse.
public static String[] stripPunctuation(String... words)
words
- Words with punctuation
public static String[] stripWords(String... words)
words
- Words with punctuation
public static String[] getWords(String aSentence)
aSentence
- The string to parse.
public static String stripPunctuationWord(String word)
word
- Word with punctuation
public static String stripWords(String first, String last)
first
- The word to grab the punctuation from the end oflast
- The word to grab the punctuation from the start of
public static int firstLetter(String word)
word
- The word to search for letters
public static int lastLetter(String word)
word
- The word to search for letters
|
Copyright ? 2003-2011 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |