Brooklyn

brooklyn.util.text
[Java] Class StringEscapes

java.lang.Object
  brooklyn.util.text.StringEscapes

public class StringEscapes

Nested Class Summary
static class StringEscapes.BashStringEscapes

static class StringEscapes.JavaStringEscapes

 
Method Summary
static java.lang.String escapeHttpUrl(java.lang.String url)

encodes a string suitable for use as a URL: 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 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

 
Methods inherited from class java.lang.Object
java.lang.Object#wait(), java.lang.Object#wait(long), java.lang.Object#wait(long, int), java.lang.Object#equals(java.lang.Object), java.lang.Object#toString(), java.lang.Object#hashCode(), java.lang.Object#getClass(), java.lang.Object#notify(), java.lang.Object#notifyAll()
 

Method Detail

escapeHttpUrl

public static java.lang.String escapeHttpUrl(java.lang.String url)
encodes a string suitable for use as a URL: space to +, and high-numbered chars assuming UTF-8


escapeSql

public static java.lang.String escapeSql(java.lang.String x)
encodes a string to SQL, that is ' becomes ''


isWrappedInDoubleQuotes

public static boolean isWrappedInDoubleQuotes(java.lang.String s)
if s is wrapped in double quotes containing no unescaped double quotes


isWrappedInMatchingQuotes

public static boolean isWrappedInMatchingQuotes(java.lang.String s)
if s is wrapped in single or double quotes containing no unescaped quotes of that type


isWrappedInSingleQuotes

public static boolean isWrappedInSingleQuotes(java.lang.String s)
if s is wrapped in single quotes containing no unescaped single quotes


 

Brooklyn Multi-Cloud Application Management Platform
brooklyncentral.github.com. Apache License. © 2012.