Class Strings

java.lang.Object
com.hierynomus.utils.Strings

public class Strings extends Object
  • Constructor Details

    • Strings

      public Strings()
  • Method Details

    • split

      public static List<String> split(String string, char c)
      Split a string on a character.
      Parameters:
      string - The string to split.
      c - The character to split on.
      Returns:
      The splitted parts of the string.
    • join

      public static String join(List<String> strings, char c)
      Join a string on a character.
      Parameters:
      strings - The strings to join.
      c - The character to join on.
      Returns:
      The joined parts of the string.
    • nullTerminatedBytes

      public static byte[] nullTerminatedBytes(String s)
      Return a byte[] of the String including a final null terminator
      Parameters:
      s -
      Returns:
    • isNotBlank

      public static boolean isNotBlank(String s)
      Check whether the passed String is not null and not empty (after trim)
      Parameters:
      s - The string to check
      Returns:
      true iff the string is not blank