← every case · 2000 · string forms
a C# raw interpolated string opens with $ and three quotes. Two openers begin inside those four bytes, the $" of an ordinary interpolated string and the """ of a raw string, and it is the raw string that opens. A counter that takes $" ends the string with its line, so the line inside the string that looks like a comment counts as one, and the closing """ then opens a raw string that hides the real comment below it
| 1 | codecodecodecodecodecodecode | var s = $""" |
| 2 | codecodecodecodecodecodecode | // still inside the string |
| 3 | codecodecodecodecodecodecode | {x} |
| 4 | codecodecodecodecodecodecode | """; |
| 5 | commentscommentscommentscommentscommentscommentscomments | // a real comment |
| 6 | codecodecodecodecodecodecode | int y = 1; |
stringcommentthe tag around another language
the // line inside the string counts as a comment, and it does the same inside a verbatim string @" written over the same lines
cloc --json --config /tmp/linejudge-empty-file cases/2000-string_forms/2078-raw_interpolated_string_opened_by_a_dollar_and_three_quotes/input.cs
--strip-str-comments
the // line inside the string counts as a comment, and it does the same inside a verbatim string @" written over the same lines
cloc --json --config /tmp/linejudge-empty-file cases/2000-string_forms/2078-raw_interpolated_string_opened_by_a_dollar_and_three_quotes/input.cs --strip-str-comments
the // line inside the string counts as a comment, and it does the same inside a verbatim string @" written over the same lines
cloc --json --config /tmp/linejudge-empty-file cases/2000-string_forms/2078-raw_interpolated_string_opened_by_a_dollar_and_three_quotes/input.cs --docstring-as-code
codestats cases/2000-string_forms/2078-raw_interpolated_string_opened_by_a_dollar_and_three_quotes/input.cs --output json-compact --include-generated --no-gitignore --hidden --no-config
mezura cases/2000-string_forms/2078-raw_interpolated_string_opened_by_a_dollar_and_three_quotes/input.cs --output json --hide timing --no-default-config --no-local --counting content
mezura cases/2000-string_forms/2078-raw_interpolated_string_opened_by_a_dollar_and_three_quotes/input.cs --output json --hide timing --no-default-config --no-local --counting region
scc --format json --no-config cases/2000-string_forms/2078-raw_interpolated_string_opened_by_a_dollar_and_three_quotes/input.cs
tokei --output json cases/2000-string_forms/2078-raw_interpolated_string_opened_by_a_dollar_and_three_quotes/input.cs