Klasse Strings

java.lang.Object
de.srsoftware.tools.Strings

public class Strings extends Object
Utilities for String handling
  • Methodenübersicht

    Modifizierer und Typ
    Methode
    Beschreibung
    static String
    convert a string to camel case: every character following a space is converted to uppercase, spaces are removed
    static String
    fill(int indent, String text, Object... fills)
    stuff the placeholders in the text with the string representations of the objects, don't indent
    static String
    fill(String text, Object... fills)
    stuff the placeholders in the text with the string representations of the objects, don't indent
    static String
    hex(byte[] bytes)
    get a hexadecimal representation of the byte array
    static String
    shorthand to create a new UUID

    Von Klasse geerbte Methoden java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Methodendetails

    • camelCase

      public static String camelCase(String text)
      convert a string to camel case: every character following a space is converted to uppercase, spaces are removed
      Parameter:
      text - the text to be converted
      Gibt zurück:
      the camelcase version of the provided text
    • fill

      public static String fill(int indent, String text, Object... fills)
      stuff the placeholders in the text with the string representations of the objects, don't indent
      Parameter:
      indent - add whitespace in front of the line
      text - a text with {} placeholders
      fills - the fills to apply
      Gibt zurück:
      the text with placeholders replaced
    • fill

      public static String fill(String text, Object... fills)
      stuff the placeholders in the text with the string representations of the objects, don't indent
      Parameter:
      text - a text with {} placeholders
      fills - the fills to apply
      Gibt zurück:
      the text with placeholders replaced
    • hex

      public static String hex(byte[] bytes)
      get a hexadecimal representation of the byte array
      Parameter:
      bytes - a byte array to convert to a hex string
      Gibt zurück:
      a string containing a hexadecimal representation of the given byte array
    • uuid

      public static String uuid()
      shorthand to create a new UUID
      Gibt zurück:
      a random uuid