public class CapRules
extends java.lang.Object
| Constructor | Description |
|---|---|
CapRules() |
| Modifier and Type | Method | Description |
|---|---|---|
void |
addCustomNames(java.lang.String[] customNames) |
Add customNames to modify capitalization rules to default set.
|
java.lang.String[] |
getCustomNames() |
Get list of custom capitalization names...
|
boolean |
getNIVARules() |
Capitalization title rules: True if NIVA rules.
|
boolean |
isDebug() |
|
java.lang.String[] |
parseString(java.lang.String in) |
This method takes a String and parses the String into all its parts
preserving spaces and separating punctuation from words...
|
java.lang.String |
sentenceCap(java.lang.String sentence) |
This is the main program for fixing capitalization in a sentence
|
void |
setCustomNames(java.lang.String[] customNames) |
Set customNames to replace default capitalization rules set.
|
void |
setDebug(boolean debug) |
Turn on debugging as needed to see more of what happens internally...
|
void |
setNIVARules(boolean niva) |
Switches from default Chicago capitalization rules in titles to NIVA rules.
|
java.lang.String |
stringWordSub(java.lang.String in,
java.lang.String find,
java.lang.String sub) |
This will take in an "in" String, find Strings and replace them with subs.
|
java.lang.String |
titleCap(java.lang.String title) |
This is the main program for fixing capitalization in a title
|
public java.lang.String sentenceCap(java.lang.String sentence)
sentence - to be fixedpublic java.lang.String titleCap(java.lang.String title)
title - to be fixedpublic java.lang.String[] getCustomNames()
public boolean getNIVARules()
public boolean isDebug()
public java.lang.String[] parseString(java.lang.String in)
in - public java.lang.String stringWordSub(java.lang.String in,
java.lang.String find,
java.lang.String sub)
in - - String coming infind - - String to find...sub - - String to substitute for those found...public void addCustomNames(java.lang.String[] customNames)
customNames - public void setCustomNames(java.lang.String[] customNames)
customNames - public void setDebug(boolean debug)
debug - public void setNIVARules(boolean niva)
niva -