Class StringUtil

java.lang.Object
org.locationtech.jts.util.StringUtil

public class StringUtil extends Object
Utility methods for working with Strings.
Author:
Martin Davis
  • Field Details

    • NEWLINE

      public static final String NEWLINE
  • Constructor Details

    • StringUtil

      public StringUtil()
  • Method Details

    • split

      public static String[] split(String s, String separator)
      Mimics the the Java SE String.split(String) method.
      Parameters:
      s - the string to split.
      separator - the separator to use.
      Returns:
      the array of split strings.
    • getStackTrace

      public static String getStackTrace(Throwable t)
      Returns an throwable's stack trace
    • getStackTrace

      public static String getStackTrace(Throwable t, int depth)
    • toString

      public static String toString(double d)
      Deprecated.
      Returns a string representation of the given number, using a format compatible with WKT.
      Parameters:
      d - a number
      Returns:
      a string
    • spaces

      public static String spaces(int n)
    • chars

      public static String chars(char c, int n)