Klasse StringUtil

java.lang.Object
de.murmelmeister.murmelapi.utils.StringUtil

public class StringUtil extends Object
  • Konstruktordetails

    • StringUtil

      public StringUtil()
  • Methodendetails

    • startsWithIgnoreCase

      public static boolean startsWithIgnoreCase(String str, String prefix)
      Check if the string starts with the given prefix ignoring the case. If the string is null or shorter than the prefix, the method will return false. Otherwise, the method will return true if the string starts with the prefix ignoring the case.
      Parameter:
      str - String to check
      prefix - Prefix to check
      Gibt zurück:
      True if the string starts with the prefix ignoring the case, otherwise false
    • checkArgumentSQL

      public static <T> T checkArgumentSQL(T value)
      Check if the value is valid for a SQL query. The value must only contain letters, numbers, and the following characters: - . ? ! If the value is not valid, an IllegalArgumentException will be thrown.
      Typparameter:
      T - Type of the value
      Parameter:
      value - Value to check
      Gibt zurück:
      The value if it is valid
      Löst aus:
      IllegalArgumentException - If the value is not valid