Anonymous user
Strip block comments: Difference between revisions
m
added whitespace before the TOC (table of contents), added a ;Task: (bold) header, added bullet points.
m (added whitespace before the TOC (table of contents), added a ;Task: (bold) header, added bullet points.) |
|||
Line 1:
{{task|Text processing}}
[[Category:String manipulation]]
A block comment begins with a ''beginning delimiter'' and ends with a ''ending delimiter'', including the delimiters. These delimiters are often multi-character sequences.▼
▲A block comment begins with a ''beginning delimiter'' and ends with a ''ending delimiter'', including the delimiters. These delimiters are often multi-character sequences.
;Task:
Strip block comments from program text (of a programming language much like classic [[C]]).
Your demos should at least handle simple, non-nested and multi-line block comment delimiters.
The block comment delimiters are the two-character sequence:
:::* <big><big> '''/*''' </big></big> (beginning delimiter)
:::* <big><big> '''*/''' </big></big> (ending delimiter)
Sample text for stripping:
Line 24 ⟶ 35:
</pre>
;Extra credit:
;Related task:
<br><br>
=={{header|Ada}}==
|