41 lines
923 B
Plaintext
41 lines
923 B
Plaintext
== Why is this an issue?
|
||
|
||
include::../description.adoc[]
|
||
|
||
=== Noncompliant code example
|
||
|
||
[source,csharp]
|
||
----
|
||
string tabInside = "A B"; // Noncompliant, contains a tabulation
|
||
string zeroWidthSpaceInside = "foobar"; // Noncompliant, it contains a U+200B character inside
|
||
Console.WriteLine(zeroWidthSpaceInside); // Prints "foo?bar"
|
||
----
|
||
|
||
=== Compliant solution
|
||
|
||
[source,csharp]
|
||
----
|
||
string tabInside = "A\tB"; // Compliant, uses escaped value
|
||
string zeroWidthSpaceInside = "foo\u200Bbar"; // Compliant, uses escaped value
|
||
Console.WriteLine(zeroWidthSpaceInside); // Prints "foo?bar"
|
||
----
|
||
|
||
=== Exceptions
|
||
|
||
Verbatim string literals have no escape character mechanism.
|
||
|
||
ifdef::env-github,rspecator-view[]
|
||
|
||
'''
|
||
== Implementation Specification
|
||
(visible only on this page)
|
||
|
||
include::message.adoc[]
|
||
|
||
'''
|
||
== Comments And Links
|
||
(visible only on this page)
|
||
|
||
include::comments-and-links.adoc[]
|
||
endif::env-github,rspecator-view[]
|