-
Notifications
You must be signed in to change notification settings - Fork 46
String
Øyvind Kallstad edited this page Sep 8, 2017
·
4 revisions
Single quoted strings starts and ends with a single quote character. Every characters in between is considered a string.
'This is a single quoted string.'
'Hello $user!'
The following scopes are assigned to single quoted strings:
- punctuation.definition.string.begin
- punctuation.definition.string.end
- string.quoted.single
- constant.character.escape
The first single quote character are given the punctuation.definition.string.begin scope while the last will be given the punctuation.definition.string.end scope. All characters in between these will be scoped as string.quoted.single, with the exception of the escape character which will have a scope of constant.character.escape.
Double quoted strings starts and ends with the double quote character. Unlike single quoted strings, double quoted strings supports sub expressions and variable expansion.
"This is a double quoted string."
"Hello $user!"
Escape Sequence | Special Character |
---|---|
`0 |
Null |
`a |
Alert |
`b |
Backspace |
`f |
Form feed |
`n |
New line |
`r |
Carriage return |
`t |
Horizontal tab |
`v |
Vertical tab |
Use
- Prerequisites
- Workflow
- Tests
- Comment
- String
- Numeric constant
- Type
- Function
- Command (Cmdlet)
- Class
- Enum
- Switch
- Array
- Hashtable
- Subexpression
- Control
- Variable
- Operator