congrats Icon
New! Announcing our next generation AI code completions
Read here
Tabnine Logo
StringUtil.quoteString
Code IndexAdd Tabnine to your IDE (free)

How to use
quoteString
method
in
com.cloudhopper.commons.util.StringUtil

Best Java code snippets using com.cloudhopper.commons.util.StringUtil.quoteString (Showing top 2 results out of 315)

origin: com.cloudhopper/ch-commons-util

/**
 * Quote a string so that it can be used as a string literal in an
 * SQL statement.
 *
 * @param string the string to quote
 * @return the string surrounded by single quotes and with proper escaping
 * of any single quotes inside the string
 */
public static String quoteStringLiteral(String string) {
  return quoteString(string, '\'');
}
origin: org.restcomm.smpp/ch-commons-util

/**
 * Quote a string so that it can be used as a string literal in an
 * SQL statement.
 *
 * @param string the string to quote
 * @return the string surrounded by single quotes and with proper escaping
 * of any single quotes inside the string
 */
public static String quoteStringLiteral(String string) {
  return quoteString(string, '\'');
}
com.cloudhopper.commons.utilStringUtilquoteString

Javadoc

Quote a string so that it can be used as an identifier or a string literal in SQL statements. Identifiers are surrounded by double quotes and string literals are surrounded by single quotes. If the string contains quote characters, they are escaped.

Popular methods of StringUtil

  • isEmpty
    Checks if the string is an empty value which is true if the string is null or if the string represen
  • substituteWithProperties
    Searches string for occurrences of a pattern, extracts out a key name between the startStr and endSt
  • toStringWithNullAsEmpty
    Returns the value from calling "toString()" on the object, but is a safe version that gracefully han
  • SQLToUpperCase
    Convert string to uppercase Always use the java.util.ENGLISH locale
  • capitalize
    Safely capitalizes a string by converting the first character to upper case. Handles null, empty, an
  • compressQuotes
    Compress 2 adjacent (single or double) quotes into a single (s or d) quote when found in the middle
  • containsOnlyDigits
    Checks if a string contains only digits.
  • getAsciiBytes
    Get 7-bit ASCII character array from input String. The lower 7 bits of each character in the input s
  • getAsciiString
  • indexOf
    Finds the first occurrence of the targetString in the array of strings. Returns -1 if an occurrence
  • isEqual
    Checks if both strings are equal to each other. Safely handles the case where either string may be n
  • isPrintableChar
    Return true if the character is printable in ASCII. Not using Character.isLetterOrDigit(); applies t
  • isEqual,
  • isPrintableChar,
  • isSafeChar,
  • readToString,
  • substituteWithEnvironment

Popular in Java

  • Running tasks concurrently on multiple threads
  • setRequestProperty (URLConnection)
  • requestLocationUpdates (LocationManager)
  • onRequestPermissionsResult (Fragment)
  • BufferedWriter (java.io)
    Wraps an existing Writer and buffers the output. Expensive interaction with the underlying reader is
  • FileInputStream (java.io)
    An input stream that reads bytes from a file. File file = ...finally if (in != null) in.clos
  • Manifest (java.util.jar)
    The Manifest class is used to obtain attribute information for a JarFile and its entries.
  • Pattern (java.util.regex)
    Patterns are compiled regular expressions. In many cases, convenience methods such as String#matches
  • XPath (javax.xml.xpath)
    XPath provides access to the XPath evaluation environment and expressions. Evaluation of XPath Expr
  • FileUtils (org.apache.commons.io)
    General file manipulation utilities. Facilities are provided in the following areas: * writing to a
  • 14 Best Plugins for Eclipse
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimAtomGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

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