Package org.freeplane.core.util
Class TextUtils
java.lang.Object
org.freeplane.core.util.TextUtils
utilities for translations, conversions to/from number and dates etc.
 In scripts available as "global variable" 
textUtils.- 
Constructor SummaryConstructors
- 
Method SummaryModifier and TypeMethodDescriptionstatic Stringcapitalize(String string) static voidcopyHtmlToClipboard(String html) Shortcut for scripting: Copieshtmlwith mimetype text/html to the system clipboard.static voidcopyToClipboard(String string) Shortcut for scripting: Copiesstringto the system clipboard.static org.freeplane.core.resources.TranslatedObjectstatic voidescapeUtf8(Writer out, String str) Escapes the UTF-8 non-ASCII characters in aStringto aWriter.static StringescapeUtf8(String str) The escapeUtf8 method is a stripped down version of the StringEscapeUtils.escapeJava method in Commons Lang 2.6 It escapes the UTF-8 non-ASCII characters in aString.static Stringaccessor for scripts.accessor for scripts.accessor for scripts.static StringgetOptionalText(String string) static StringgetOptionalText(String string, String defaultValue) static StringgetOptionalTranslation(String text) static StringgetOriginalRawText(String key) static StringgetRawText(String key) static StringgetRawText(String key, String defaultString) static StringgetShortText(String text, int maximumCharacters, String continuationMark) static Stringstatic Stringstatic booleanstatic booleanstatic booleanmatchesUriPattern(String text) in opposite to the URI make scheme mandatory.static StringremoveMnemonic(String rawLabel) static StringremoveTranslateComment(String inputString) Removes the "TranslateMe" sign from the end of not translated texts.static StringreplaceAtBegin(String source, String from, String to) static Number
- 
Constructor Details- 
TextUtilspublic TextUtils()
 
- 
- 
Method Details- 
format
- 
getOptionalText
- 
getOptionalText
- 
removeMnemonic
- 
removeTranslateCommentRemoves the "TranslateMe" sign from the end of not translated texts.
- 
createTranslatedString
- 
getText
- 
getRawText
- 
getOriginalRawText
- 
getText
- 
getRawText
- 
getOptionalTranslation
- 
toNumber- Throws:
- NumberFormatException
 
- 
isNumber
- 
isEmpty
- 
matchesUriPatternin opposite to the URI make scheme mandatory.
- 
getShortText
- 
getDefaultNumberFormataccessor for scripts.
- 
getDefaultDateFormataccessor for scripts.
- 
getDefaultDateTimeFormataccessor for scripts.
- 
capitalize
- 
replaceAtBegin
- 
copyToClipboardShortcut for scripting: Copiesstringto the system clipboard.
- 
copyHtmlToClipboardShortcut for scripting: Copieshtmlwith mimetype text/html to the system clipboard.
- 
escapeUtf8The escapeUtf8 method is a stripped down version of the StringEscapeUtils.escapeJava method in Commons Lang 2.6 It escapes the UTF-8 non-ASCII characters in aString.Such a character becomes '\\'and'u'followed by a 4 digit hex code.Any ASCII character will stay intact Example: input string: jalapeƱo output string: jalape\u00F1o - Parameters:
- str- String to escape values in, may be null
- Returns:
- String with escaped values, nullif null string input
 
- 
escapeUtf8Escapes the UTF-8 non-ASCII characters in aStringto aWriter.A nullstring input has no effect.- Parameters:
- out- Writer to write escaped string into
- str- String to escape values in, may be null
- Throws:
- IllegalArgumentException- if the Writer is- null
- IOException- if error occurs on underlying Writer
- See Also:
 
 
-