← every case · 2000 · string forms
a Kotlin raw string ends at the last three quotes of a run, so a quote written just before its closer is text, and the string here ends with four quotes in a row. A counter that closes it at the first three is left with one quote over, which opens a string that runs into the comment after it and hides where that comment begins. The text holds an address and an inch mark on purpose: a counter that reads no strings takes the // of the address for a line comment, and one that pairs the quotes with no raw form ends with the comment opener inside a string of its own making, so neither finds the comment by accident
| 1 | codecodecodecodecodecodecode | val note = """see https://example.com/ for 12" of "snow"""" /* the "note", |
| 2 | commentscommentscommentscommentscommentscommentscomments | written the way the client sends it */ |
| 3 | codecodecodecodecodecodecode | val x = 1 |
stringcommentthe tag around another language
the // of the address inside the raw string is taken for a line comment that cuts the first line, so the /* after it is never seen and the comment's second line counts as code
cloc --json --config /tmp/linejudge-empty-file cases/2000-string_forms/2085-raw_string_ending_in_a_quote/input.kt
--strip-str-comments
the /* on the first line is blanked as text inside a string, so the comment's second line counts as code
cloc --json --config /tmp/linejudge-empty-file cases/2000-string_forms/2085-raw_string_ending_in_a_quote/input.kt --strip-str-comments
the // of the address inside the raw string is taken for a line comment that cuts the first line, so the /* after it is never seen and the comment's second line counts as code
cloc --json --config /tmp/linejudge-empty-file cases/2000-string_forms/2085-raw_string_ending_in_a_quote/input.kt --docstring-as-code
codestats cases/2000-string_forms/2085-raw_string_ending_in_a_quote/input.kt --output json-compact --include-generated --no-gitignore --hidden --no-config
mezura cases/2000-string_forms/2085-raw_string_ending_in_a_quote/input.kt --output json --hide timing --no-default-config --no-local --counting content
mezura cases/2000-string_forms/2085-raw_string_ending_in_a_quote/input.kt --output json --hide timing --no-default-config --no-local --counting region
its Kotlin has no raw string, so the quotes of the first line pair off two by two, the /* falls inside one of the pairs, and the quote left over opens a string that runs to the end of the file
scc --format json --no-config cases/2000-string_forms/2085-raw_string_ending_in_a_quote/input.kt
the raw string closes at the first three of the four quotes, and the quote left over opens a string that takes the comment opener with it, so the comment's second line counts as code
tokei --output json cases/2000-string_forms/2085-raw_string_ending_in_a_quote/input.kt