Java Reference
In-Depth Information
13.7.2 Strings
Literal Strings are delimited by either single or double quotation marks, accord-
ing to the specification. M2M QVT OML supports only single quote marks:
var s1 : String := 'a string';
Literal Strings that fit in multiple lines can be notated as a list of literal
Strings. In the specification, they do not require the concatenation operator + ,
although M2M QVT OML requires this. For example:
var s : String := 'This string is split ' +
'across two lines';
Escape sequences are provided and are the same as those found in the Java
language. Table 13-1 lists the supported escape sequences.
Table 13-1
QVT Escape Sequences
Escape Sequence
Unicode Value
Name
\ b
\u0008
Backspace BS
\ t
\u0009
Horizontal Tab HT
\ n
\u000a
LineFeed LF
\ f
\u000c
Form Feed FF
\ r
\u000d
Carriage Return CR
\ “
\u0022
Double Quote “
\ '
\u0027
Single Quote ' (Note: not currently supported)
\ \
\u005c
Backslash \
13.7.3 Shorthand
Repeatedly typing lengthy operation names in a QVT script, such as oclIsKind
Of() , is tiresome. In addition, superfluous text hinders readability. To address
this issue, QVT provides a number of shorthand notations.
Search WWH ::




Custom Search