public class StringEscapes
extends java.lang.Object
Modifier and Type | Class and Description |
---|---|
static class |
StringEscapes.BashStringEscapes |
static class |
StringEscapes.JavaStringEscapes |
Constructor and Description |
---|
StringEscapes() |
Modifier and Type | Method and Description |
---|---|
static java.lang.String |
escapeHtmlFormUrl(java.lang.String url)
Encodes a string suitable for use as a URL in an HTML form: space to +, and high-numbered chars assuming UTF-8.
|
static java.lang.String |
escapeSql(java.lang.String x)
encodes a string to SQL, that is ' becomes ''
|
static java.lang.String |
escapeUrlParam(java.lang.String input)
Encodes a string suitable for use as a parameter in a URL.
|
static boolean |
isWrappedInDoubleQuotes(java.lang.String s)
if s is wrapped in double quotes containing no unescaped double quotes
|
static boolean |
isWrappedInMatchingQuotes(java.lang.String s)
if s is wrapped in single or double quotes containing no unescaped quotes of that type
|
static boolean |
isWrappedInSingleQuotes(java.lang.String s)
if s is wrapped in single quotes containing no unescaped single quotes
|
public static boolean isWrappedInDoubleQuotes(java.lang.String s)
public static boolean isWrappedInSingleQuotes(java.lang.String s)
public static boolean isWrappedInMatchingQuotes(java.lang.String s)
public static java.lang.String escapeUrlParam(java.lang.String input)
public static java.lang.String escapeHtmlFormUrl(java.lang.String url)
escapeUrlParam(String), and consider using that instead.
public static java.lang.String escapeSql(java.lang.String x)