Class TextParser

java.lang.Object
com.jackmeng.halcyoninae.halcyon.utils.TextParser

public final class TextParser extends Object
A utility class for text manipulation
Since:
3.0
Author:
Jack Meng
  • Constructor Details

    • TextParser

      private TextParser()
  • Method Details

    • strip

      public static String strip(String str, int validLength)
      Returns a string that has been stripped based on the desired length.

      For example:

      strip("helloworld", 2) --> "he..."

      Parameters:
      str - The string to strip
      validLength - The valid length (from 1)
      Returns:
      A string that has been stripped based on the desired length
    • fulfill

      public static String fulfill(String str, int validLength)
      Parameters:
      str -
      validLength -
      Returns:
      String
    • getCopies

      public static String getCopies(int n, String s)
      Parameters:
      n -
      s -
      Returns:
      String
    • clipText

      public static String clipText(String str)
      Parameters:
      str -
      Returns:
      String
    • isInteger

      public static boolean isInteger(String str)
      Parameters:
      str -
      Returns:
      boolean
    • getPropertyTextEncodingName

      public static String getPropertyTextEncodingName()
      Returns:
      String
    • parseAsPure

      public static String parseAsPure(String str)
      Parameters:
      str -
      Returns:
      String
    • getCharset

      public static Charset getCharset()
      Returns:
      Charset