org.freeplane.core.util

## Class TextUtils

- java.lang.Object
- - org.freeplane.core.util.TextUtils

-     public class TextUtils
      extends java.lang.Object

  utilities for translations, conversions to/from number and dates etc. In scripts available as "global variable" `textUtils`.

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `TextUtils()`

  - ### Method Summary

    All Methods Static Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `static void` | `copyHtmlToClipboard(java.lang.String html)` Shortcut for scripting: Copies `html` with mimetype text/html to the system clipboard.
    `static void` | `copyToClipboard(java.lang.String string)` Shortcut for scripting: Copies `string` to the system clipboard.
    `static org.freeplane.core.resources.TranslatedObject` | `createTranslatedString(java.lang.String key)`
    `static java.lang.String` | `format(java.lang.String resourceKey, java.lang.Object... messageArguments)`
    `java.text.SimpleDateFormat` | `getDefaultDateFormat()` accessor for scripts.
    `java.text.SimpleDateFormat` | `getDefaultDateTimeFormat()` accessor for scripts.
    `java.text.DecimalFormat` | `getDefaultNumberFormat()` accessor for scripts.
    `static java.lang.String` | `getOptionalText(java.lang.String string)`
    `static java.lang.String` | `getOptionalText(java.lang.String string, java.lang.String defaultValue)`
    `static java.lang.String` | `getOptionalTranslation(java.lang.String text)`
    `static java.lang.String` | `getOriginalRawText(java.lang.String key)`
    `static java.lang.String` | `getRawText(java.lang.String key)`
    `static java.lang.String` | `getRawText(java.lang.String key, java.lang.String defaultString)`
    `static java.lang.String` | `getText(java.lang.String key)`
    `static java.lang.String` | `getText(java.lang.String key, java.lang.String defaultString)`
    `static boolean` | `isEmpty(java.lang.String str)`
    `static boolean` | `isNumber(java.lang.String text)`
    `static boolean` | `matchUriPattern(java.lang.String text)` in opposite to the URI make scheme mandatory.
    `static java.lang.String` | `removeMnemonic(java.lang.String rawLabel)`
    `static java.lang.String` | `removeTranslateComment(java.lang.String inputString)` Removes the "TranslateMe" sign from the end of not translated texts.
    `static java.lang.Number` | `toNumber(java.lang.String text)`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### TextUtils

          public TextUtils()

  - ### Method Detail

    - #### format

          public static java.lang.String format(java.lang.String resourceKey,
                                                java.lang.Object... messageArguments)

    - #### getOptionalText

          public static java.lang.String getOptionalText(java.lang.String string)

    - #### getOptionalText

          public static java.lang.String getOptionalText(java.lang.String string,
                                                         java.lang.String defaultValue)

    - #### removeMnemonic

          public static java.lang.String removeMnemonic(java.lang.String rawLabel)

    - #### removeTranslateComment

          public static java.lang.String removeTranslateComment(java.lang.String inputString)

      Removes the "TranslateMe" sign from the end of not translated texts.

    - #### createTranslatedString

          public static org.freeplane.core.resources.TranslatedObject createTranslatedString(java.lang.String key)

    - #### getText

          public static java.lang.String getText(java.lang.String key)

    - #### getRawText

          public static java.lang.String getRawText(java.lang.String key)

    - #### getOriginalRawText

          public static java.lang.String getOriginalRawText(java.lang.String key)

    - #### getText

          public static java.lang.String getText(java.lang.String key,
                                                 java.lang.String defaultString)

    - #### getRawText

          public static java.lang.String getRawText(java.lang.String key,
                                                    java.lang.String defaultString)

    - #### getOptionalTranslation

          public static java.lang.String getOptionalTranslation(java.lang.String text)

    - #### toNumber

          public static java.lang.Number toNumber(java.lang.String text)
                                           throws java.lang.NumberFormatException

      Throws:
        `java.lang.NumberFormatException`

    - #### isNumber

          public static boolean isNumber(java.lang.String text)

    - #### isEmpty

          public static boolean isEmpty(java.lang.String str)

    - #### matchUriPattern

          public static boolean matchUriPattern(java.lang.String text)

      in opposite to the URI make scheme mandatory.

    - #### getDefaultNumberFormat

          public java.text.DecimalFormat getDefaultNumberFormat()

      accessor for scripts.

    - #### getDefaultDateFormat

          public java.text.SimpleDateFormat getDefaultDateFormat()

      accessor for scripts.

    - #### getDefaultDateTimeFormat

          public java.text.SimpleDateFormat getDefaultDateTimeFormat()

      accessor for scripts.

    - #### copyToClipboard

          public static void copyToClipboard(java.lang.String string)

      Shortcut for scripting: Copies `string` to the system clipboard.

    - #### copyHtmlToClipboard

          public static void copyHtmlToClipboard(java.lang.String html)

      Shortcut for scripting: Copies `html` with mimetype text/html to the system clipboard.