Sass'sstring type.
Hierarchy
- String
- Defined injs-api-doc/legacy/function.d.ts:322
Index
Constructors
Methods
Constructors
constructor
- new
String(value:string):String Creates an unquoted string with the given contents.
⚠️ Heads up!
ThisAPI currently provides no way of creating aquoted string.
Parameters
value:string
ReturnsString
- Defined injs-api-doc/legacy/function.d.ts:330
Methods
get Value
- get
Value():string Returns the contents of the string. If the string contains escapes,those escapes are included literally if it’sunquoted,while the values of the escapes are included if it’squoted.
Example
// string is `Arial`.
string.getValue();// "Arial"
// string is `"Helvetica Neue"`.
string.getValue();// "Helvetica Neue"
// string is `\1F46D`.
string.getValue();// "\\1F46D"
// string is `"\1F46D"`.
string.getValue();// "👭"Returnsstring
- Defined injs-api-doc/legacy/function.d.ts:355
set Value
- set
Value(value:string):void Destructively modifies this string by setting its numeric value to
value
.⚠️ Heads up!
Even if the string was originally quoted, this will causeit to become unquoted.
Deprecated
Useconstructor instead.
Parameters
value:string
Returnsvoid
- Defined injs-api-doc/legacy/function.d.ts:366