congrats Icon
New! Announcing Tabnine Chat Beta
Learn More
Tabnine Logo
TextUtils.containsAnyIgnoreCase
Code IndexAdd Tabnine to your IDE (free)

How to use
containsAnyIgnoreCase
method
in
org.hisp.dhis.commons.util.TextUtils

Best Java code snippets using org.hisp.dhis.commons.util.TextUtils.containsAnyIgnoreCase (Showing top 1 results out of 315)

origin: dhis2/dhis2-core

/**
 * Validates whether a filter expression contains malicious code such as SQL
 * injection attempts.
 *
 * @param filter the filter string.
 * @return true if the filter string is valid, false otherwise.
 */
public static boolean expressionIsValidSQl( String filter )
{
  if ( filter == null )
  {
    return true;
  }
  if ( TextUtils.containsAnyIgnoreCase( filter, ILLEGAL_SQL_KEYWORDS ) )
  {
    return false;
  }
  for ( int i = 0; i < filter.length(); i++ )
  {
    char ch = filter.charAt( i );
    if ( !(Character.isWhitespace( ch ) || Character.isLetterOrDigit( ch ) || SQL_VALID_CHARS.contains( ch )) )
    {
      return false;
    }
  }
  return true;
}
org.hisp.dhis.commons.utilTextUtilscontainsAnyIgnoreCase

Javadoc

Indicates whether the given string contains any of the given search strings. The operation ignores case and leading and trailing blanks.

Popular methods of TextUtils

  • getCommaDelimitedString
    Transforms a collection of Integers into a comma delimited String. If the given collection of elemen
  • removeLastOr
    Removes the last occurrence of the word "or" from the given string, including potential trailing spa
  • removeLastComma
    Removes the last occurrence of comma (",") from the given string, including potential trailing space
  • getQuotedCommaDelimitedString
    Transforms a collection of strings into a comma delimited string, where each component is single-quo
  • removeLast
    Removes the last occurrence of the the given string, including potential trailing spaces.
  • appendTail
    Invokes append tail on matcher with the given string buffer, and returns the string buffer as a stri
  • getPrettyClassName
    Returns a pretty name variant of the given class.
  • joinHyphen
    Joins the given elements with a - character as separator.
  • splitSafe
    Gets the string at the given index of the array produced by splitting the given string on the given
  • emptyIfEqual
    Returns the empty string if the given string is equal to the given test, the string if not.
  • emptyIfFalse
    Returns the empty string if the given test is false, the string if not.
  • getTokens
    Returns a list of tokens based on the given string.
  • emptyIfFalse,
  • getTokens,
  • htmlLinks,
  • htmlNewline,
  • join,
  • removeLastAnd,
  • removeNewlines,
  • replace,
  • splitToArray

Popular in Java

  • Start an intent from android
  • findViewById (Activity)
  • getContentResolver (Context)
  • setRequestProperty (URLConnection)
  • FileReader (java.io)
    A specialized Reader that reads from a file in the file system. All read requests made by calling me
  • ConnectException (java.net)
    A ConnectException is thrown if a connection cannot be established to a remote host on a specific po
  • Socket (java.net)
    Provides a client-side TCP socket.
  • Timestamp (java.sql)
    A Java representation of the SQL TIMESTAMP type. It provides the capability of representing the SQL
  • Location (org.springframework.beans.factory.parsing)
    Class that models an arbitrary location in a Resource.Typically used to track the location of proble
  • Option (scala)
  • Top 12 Jupyter Notebook extensions
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now