@OpenApiAll
public class TextTool
extends com.nomagic.magicreport.engine.Tool
Constructor and Description |
---|
TextTool() |
Modifier and Type | Method and Description |
---|---|
com.nomagic.magicreport.engine.ITool.HTMLString |
bold(java.lang.String text)
Force report to render given text in bold style.
|
boolean |
equals(java.lang.String str1,
java.lang.String str2)
Compares two strings.
|
java.lang.String |
getPureText(java.lang.String source)
Get Pure text from html source.
|
java.lang.String |
getString(java.lang.String str)
Convert text from RTF into Java String.
|
com.nomagic.magicreport.engine.ITool.HTMLString |
html(java.lang.String text)
Force report to render given text in HTML.
|
com.nomagic.magicreport.engine.ITool.HTMLString |
italic(java.lang.String text)
Force report to render given text in italic style.
|
java.lang.String |
noLineBreak(java.lang.String text)
Remove all control characters such as U+0009 (Tab), U+000A (Line Feed) and U+000D (Carriage Return) from
given text.
|
java.lang.Double |
toDouble(java.lang.String text)
Convert the string argument to signed decimal
double . |
java.lang.Integer |
toInteger(java.lang.String text)
Convert the string argument to signed decimal
integer . |
com.nomagic.magicreport.engine.ITool.HTMLString |
underline(java.lang.String text)
Force report to render given text in underline style.
|
clone, getContext, getProperties, getProperty, getProperty, notifyObservers, setContext, setProperties
public java.lang.String noLineBreak(java.lang.String text)
text
- input textpublic java.lang.Integer toInteger(java.lang.String text)
integer
.text
- a String
containing the int
representation to be convertedpublic java.lang.Double toDouble(java.lang.String text)
double
.text
- a String
containing the int
representation to be convertedpublic com.nomagic.magicreport.engine.ITool.HTMLString italic(java.lang.String text)
text
- input textpublic com.nomagic.magicreport.engine.ITool.HTMLString bold(java.lang.String text)
text
- input textpublic com.nomagic.magicreport.engine.ITool.HTMLString underline(java.lang.String text)
text
- input textpublic com.nomagic.magicreport.engine.ITool.HTMLString html(java.lang.String text)
For example:
$text.html('<ul><li>A</li><li>B</li></ul>')
text
- input textpublic boolean equals(java.lang.String str1, java.lang.String str2)
true
if and only if the str1
is represents the
same sequence of characters as str2
.str1
- first stringstr2
- second stringtrue
if the String
are equal; false
otherwise.public java.lang.String getString(java.lang.String str)
For example:
#set ($str = $text.getString("bersetzer"))
str
- a RTF text.public java.lang.String getPureText(java.lang.String source)
source
- The given html source.Copyright © 2015 - No Magic Asia