Class TextUtil

java.lang.Object
com.github.toolarium.common.util.TextUtil

public final class TextUtil extends Object
Text utility
  • Field Details

  • Method Details

    • getInstance

      public static TextUtil getInstance()
      Get the instance
      Returns:
      the instance
    • prepareInput

      public String prepareInput(String input)
      Prepare input string
      Parameters:
      input - the input string
      Returns:
      the prepared string
    • prepareInput

      public StringBuilder prepareInput(StringBuilder input)
      Prepare input string
      Parameters:
      input - the input string
      Returns:
      the prepared string
    • blockText

      public String blockText(String text, int maxLen)
      Create a block text
      Parameters:
      text - the text
      maxLen - the max len of the text
      Returns:
      the created block text
    • blockText

      public String blockText(String indent, String text, int maxLen)
      Create a block text
      Parameters:
      indent - the indention
      text - the text
      maxLen - the max len of the text
      Returns:
      the created block text
    • blockText

      public String blockText(String indent, String title, int maxTitelLen, String text, int maxLen)
      Create a block text
      Parameters:
      indent - the indention
      title - the title
      maxTitelLen - the max title len
      text - the text
      maxLen - the max len of the text
      Returns:
      the created block text
    • blockText

      public StringBuilder blockText(StringBuilder inputText, int maxLen)
      Create a block text
      Parameters:
      inputText - the text
      maxLen - the max len of the text
      Returns:
      the created block text
    • blockText

      public StringBuilder blockText(StringBuilder inputIndent, StringBuilder inputText, int maxLen)
      Create a block text
      Parameters:
      inputIndent - the indention
      inputText - the text
      maxLen - the max len of the text
      Returns:
      the created block text
    • blockText

      public StringBuilder blockText(StringBuilder inputIndent, StringBuilder inputTitle, int maxTitelLen, StringBuilder inputText, int maxTextLen)
      Create a block text
      Parameters:
      inputIndent - the indention
      inputTitle - the title
      maxTitelLen - the max title len
      inputText - the text
      maxTextLen - the max len of the text
      Returns:
      the created block text