Package org.apache.tiles.autotag.tool
Class StringTool
java.lang.Object
org.apache.tiles.autotag.tool.StringTool
A Velocity tools to manipulate strings.
- 
Constructor SummaryConstructors
- 
Method SummaryModifier and TypeMethodDescriptioncapitalizeFirstLetter(String string) Creates a string in which the first character is capitalized.getClassToCast(String type) Returns the class to be used to cast an Object.getDefaultValue(String type, String overriddenDefaultValue) Returns the default value for a type.splitOnNewlines(String toSplit) Creates a list of strings, separating a string when a newline is encountered.
- 
Constructor Details- 
StringToolpublic StringTool()Constructor.
 
- 
- 
Method Details- 
splitOnNewlinesCreates a list of strings, separating a string when a newline is encountered.- Parameters:
- toSplit- The string to split.
- Returns:
- The list of splitted strings.
 
- 
capitalizeFirstLetterCreates a string in which the first character is capitalized.- Parameters:
- string- The string to use.
- Returns:
- The same string with the first character capitalized.
 
- 
getDefaultValueReturns the default value for a type.- Parameters:
- type- The type.
- overriddenDefaultValue- The default value, as specified by developers.
- Returns:
- The default value to use.
 
- 
getClassToCastReturns the class to be used to cast an Object.- Parameters:
- type- The type to use, even a primitive type.
- Returns:
- The class to be used in casts.
 
 
-