Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
package metaobjectTest
This is a literal string annotation, an identifier precedes a literal
string. In the string, escape characters are not considered.
The algorithm used for not-escaping the characters is not perfect.
It only considers letters such as \n and \r. An alternative to
this metaobject is to use triple quotes:
assert """\n""" == n"\n";
object String_n_N
func run {
var s = n"\r\n";
assert s size == 4;
assert s == """\r\n""";
assert """\n""" == n"\n";
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment