public class SassString extends Object implements CharSequence, SassValue
| Modifier and Type | Field and Description |
|---|---|
static char |
DEFAULT_QUOTE_CHARACTER
The default quote character.
|
static int |
TYPE |
| Constructor and Description |
|---|
SassString(String value)
Create a new single quoted string value.
|
SassString(String value,
boolean quoted)
Create a new potentially quoted string value.
|
SassString(String value,
boolean quoted,
char quote)
Create a new potentially quoted string value with specific quotation character.
|
| Modifier and Type | Method and Description |
|---|---|
char |
charAt(int index) |
IntStream |
chars() |
IntStream |
codePoints() |
static String |
escape(String value)
Escape the string with default quote character.
|
static String |
escape(String value,
char quote)
Escape the string with given quote character.
|
char |
getQuote()
Return the quotation character.
|
String |
getValue()
Return the string value.
|
boolean |
isQuoted()
Determine if the string is quoted.
|
int |
length() |
void |
setQuote(char quote)
Set the quotation character.
|
void |
setQuoted(boolean quoted)
Set if the string is quoted.
|
void |
setValue(String value)
Set the string value.
|
CharSequence |
subSequence(int start,
int end) |
String |
toString() |
public static final int TYPE
public static final char DEFAULT_QUOTE_CHARACTER
public SassString(String value)
value - The string value.public SassString(String value, boolean quoted)
value - The string value.quoted - Flag if the string is quoted.public SassString(String value, boolean quoted, char quote)
value - The string value.quoted - Flag if the string is quoted.quote - The quotation character.public String getValue()
public void setValue(String value)
value - The string value.public boolean isQuoted()
public void setQuoted(boolean quoted)
quoted - The quotation state.public char getQuote()
public void setQuote(char quote)
quote - The quotation character.public static String escape(String value, char quote)
public int length()
length in interface CharSequencepublic char charAt(int index)
charAt in interface CharSequencepublic CharSequence subSequence(int start, int end)
subSequence in interface CharSequencepublic IntStream chars()
chars in interface CharSequencepublic IntStream codePoints()
codePoints in interface CharSequencepublic String toString()
toString in interface CharSequencetoString in class ObjectCopyright © 2016 bit3. All rights reserved.