字符型

StringValue ::
    ""
    "StringCharacter list"
StringCharacter ::
    SourceCharacter but not " or \ or LineTerminator
    \u EscapedUnicode
    \E scapedCharacter
EscapedUnicode ::
    /[0-9A-Fa-f]{4}/
EscapedCharacter :: one of 
    " \ / b f n r t

Strings are sequences of characters wrapped in double‐quotes ("). (ex."Hello World"). White space and other otherwise‐ignored characters are significant within a string value.

Unicode characters are allowed within String value literals, however GraphQL source must not contain some ASCII control characters so escape sequences must be used to represent these characters.

语义

StringValue :: ""
    Return an empty Unicode character sequence.
StringValue :: "StringCharacter list"
    Return the Unicode character sequence of all StringCharacter Unicode character values.
StringCharacter :: SourceCharacter but not " or \ or LineTerminator
    Return the character value of SourceCharacter.
StringCharacter :: \uEscapedUnicode
    Return the character whose code unit value in the Unicode Basic Multilingual Plane is the 16‐bit hexadecimal value EscapedUnicode.
StringCharacter :: \EscapedCharacter
    Return the character value of EscapedCharacter according to the table below.
转义字符 代码单元值 字符名称
" U+0022 双引号
\ U+005C reverse solidus (back slash)
/ U+002F solidus (forward slash)
b U+0008 空格
f U+000C form feed
n U+000A line feed (new line)
r U+000D carriage return
t U+0009 horizontal tab

results matching ""

    No results matching ""