Class StringUtil

java.lang.Object
se.datadosen.util.StringUtil

public class StringUtil
extends java.lang.Object
  • Constructor Summary

    Constructors 
    Constructor Description
    StringUtil()  
  • Method Summary

    Modifier and Type Method Description
    static java.lang.String concat​(java.lang.String delimiter, java.lang.String... strings)  
    static java.lang.String fromHexString​(java.lang.String hex)  
    static java.lang.String limit​(java.lang.String s, int len)
    Limit string to len characters.
    static java.lang.String mapToString​(java.util.Map<java.lang.String,​java.lang.String> map)
    Since v11
    static java.lang.String parametersToString​(Parameters p)  
    static java.lang.String setToString​(java.util.Set set)
    Since v11
    static java.util.LinkedHashMap<java.lang.String,​java.lang.String> stringToMap​(java.lang.String s)
    Since v11
    static Parameters stringToParameters​(java.lang.String s)  
    static java.util.TreeSet<java.lang.String> stringToSet​(java.lang.String s)
    Since v11
    static java.lang.String stripTags​(java.lang.String s)  
    static java.lang.String toHexString​(java.lang.String s)  
    static java.lang.String unescape​(java.lang.String s)  

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

  • Method Details

    • concat

      public static java.lang.String concat​(java.lang.String delimiter, java.lang.String... strings)
      Parameters:
      delimiter -
      strings -
      Returns:
      String separated by delimiter. Empty strings are ignored
      Since:
      19
    • toHexString

      public static java.lang.String toHexString​(java.lang.String s)
    • fromHexString

      public static java.lang.String fromHexString​(java.lang.String hex)
    • mapToString

      public static java.lang.String mapToString​(java.util.Map<java.lang.String,​java.lang.String> map)
      Since v11
    • parametersToString

      public static java.lang.String parametersToString​(Parameters p)
      Parameters:
      p -
      Returns:
      Since:
      16
    • stringToMap

      public static java.util.LinkedHashMap<java.lang.String,​java.lang.String> stringToMap​(java.lang.String s)
      Since v11
    • stringToParameters

      public static Parameters stringToParameters​(java.lang.String s)
      Parameters:
      s -
      Returns:
      Since:
      16
    • setToString

      public static java.lang.String setToString​(java.util.Set set)
      Since v11
    • stringToSet

      public static java.util.TreeSet<java.lang.String> stringToSet​(java.lang.String s)
      Since v11
    • stripTags

      public static java.lang.String stripTags​(java.lang.String s)
      Since:
      11.6 Strip html and xml tags from string.
    • unescape

      public static java.lang.String unescape​(java.lang.String s)
    • limit

      public static java.lang.String limit​(java.lang.String s, int len)
      Limit string to len characters. Add ... elipsis to indicate truncated strings
      Parameters:
      s -
      len -
      Returns: