Class TextFunctions
java.lang.Object
net.sf.jasperreports.functions.AbstractFunctionSupport
net.sf.jasperreports.functions.standard.TextFunctions
- All Implemented Interfaces:
FunctionSupport
This class should maintain all function methods that belongs to the category
TEXT(java.lang.Number, java.lang.String).- Author:
- Massimo Rabbi (mrabbi@users.sourceforge.net)
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic StringReturns a text representation of a number, in a specified base radix.static Stringstatic StringReturns a single text character, given a character code.static StringReturns a new text string without non-printable characters.static IntegerReturns the numeric code (0-255) for the first character in a string.static StringCONCATENATE(String... strings) Combines a list of strings into a single one.static DoubleDOUBLE_VALUE(String textNumber) Returns a Double number representing the given text string.static BooleanReturns TRUE if the two text specified are exactly the same (case sensitive compare).static IntegerReturns the character position of a string inside another text.static IntegerReturns the text representing number with the specified decimal places.static FloatFLOAT_VALUE(String textNumber) Returns a Float number representing the given text string.static IntegerINTEGER_VALUE(String textNumber) Returns an Integer number representing the given text string.static StringReturns the specified number of characters (1 by default) from the left side of the input text.static Stringstatic IntegerReturns the length of the specified text string.static LongLONG_VALUE(String textNumber) Returns a Long number representing the given text string.static StringPerforms the lower case conversion of the specified text string.static StringClear a string, removing leading whitespaces.static StringReturns the text from the middle of a text string.static Stringstatic StringCapitalizes each words of the specified text.static StringReplaces parts of a text string with a different one.static StringReplicates an input text string for a specified number of times.static StringReturns the specified number of characters (1 by default) from the right side of the input text.static Stringstatic StringClear a string, removing trailing whitespaces.static IntegerReturns the position of a string of text in another string.static Integerstatic StringSUBSTITUTE(String originalText, String oldText, String newText) Substitutes new text for old text in a text string.static StringSUBSTITUTE(String originalText, String oldText, String newText, Integer occurrenceNum) static StringReturns the text string if the value is a string, otherwise an empty string is returned.Converts a number into a text string according to a specified format.static StringClear a string,removing leading and trailing whitespaces.static StringPerforms the upper case conversion of the specified text string.Methods inherited from class net.sf.jasperreports.functions.AbstractFunctionSupport
getContext, init
-
Constructor Details
-
TextFunctions
public TextFunctions()
-
-
Method Details
-
BASE
Returns a text representation of a number, in a specified base radix. -
BASE
-
CHAR
Returns a single text character, given a character code. -
CLEAN
Returns a new text string without non-printable characters. -
CODE
Returns the numeric code (0-255) for the first character in a string. -
CONCATENATE
Combines a list of strings into a single one. -
EXACT
Returns TRUE if the two text specified are exactly the same (case sensitive compare). -
DOUBLE_VALUE
Returns a Double number representing the given text string. -
FIND
Returns the character position of a string inside another text. If the text is not found then -1 is returned. -
FIND
-
FIXED
Returns the text representing number with the specified decimal places. -
FIXED
-
FLOAT_VALUE
Returns a Float number representing the given text string. -
INTEGER_VALUE
Returns an Integer number representing the given text string. -
LEFT
Returns the specified number of characters (1 by default) from the left side of the input text. -
LEFT
-
LEN
Returns the length of the specified text string. -
LONG_VALUE
Returns a Long number representing the given text string. -
LOWER
Performs the lower case conversion of the specified text string. -
LTRIM
Clear a string, removing leading whitespaces. -
MID
Returns the text from the middle of a text string. -
MID
-
PROPER
Capitalizes each words of the specified text. The remaining parts of words are in lowercase. -
REPLACE
public static String REPLACE(String originalText, Integer startPosition, Integer charsNum, String newText) Replaces parts of a text string with a different one. Starting from a specified position, removes a certain number of characters and then insert the new text. -
REPT
Replicates an input text string for a specified number of times. -
RIGHT
Returns the specified number of characters (1 by default) from the right side of the input text. -
RIGHT
-
RTRIM
Clear a string, removing trailing whitespaces. -
SEARCH
Returns the position of a string of text in another string. Search is not case-sensitive. -
SEARCH
-
SUBSTITUTE
Substitutes new text for old text in a text string. When no occurrence is specified all occurrences are replaced. -
SUBSTITUTE
-
T
Returns the text string if the value is a string, otherwise an empty string is returned. -
TEXT
Converts a number into a text string according to a specified format. -
TRIM
Clear a string,removing leading and trailing whitespaces. -
UPPER
Performs the upper case conversion of the specified text string.
-