Talk:Strip comments from a string: Difference between revisions

From Rosetta Code
Content added Content deleted
(Two thoughts)
 
Line 1: Line 1:
Two thoughts. First, wouldn't a comment notation supporting ranges (i.e. /* ... */) as well as truncate tokens ( #, ;, // ...) be more interesting? Otherwise, I'd suggest renaming this task to [[Truncate a String]]. Second (and this is just an idle idea more than anything else), a task for which a language stripped comments (per its own language's rules; // and # for PHP, // and /* */ for C++, etc) would be ''very'' interesting, as it combines demonstrating string processing as well as the language's own comment syntax. --[[User:Short Circuit|Michael Mol]] 13:53, 30 October 2010 (UTC)
Two thoughts. First, wouldn't a comment notation supporting ranges (i.e. /* ... */) as well as truncate tokens ( #, ;, // ...) be more interesting? Otherwise, I'd suggest renaming this task to [[Truncate a String]]. Second (and this is just an idle idea more than anything else), a task for which a language stripped comments (per its own language's rules; // and # for PHP, // and /* */ for C++, etc) would be ''very'' interesting, as it combines demonstrating string processing as well as the language's own comment syntax. --[[User:Short Circuit|Michael Mol]] 13:53, 30 October 2010 (UTC)

==Wayward space==
What should happen to the space before the comment marker? The task description seems to silently remove it. --[[User:Paddy3118|Paddy3118]] 06:15, 28 November 2010 (UTC)

Revision as of 06:15, 28 November 2010

Two thoughts. First, wouldn't a comment notation supporting ranges (i.e. /* ... */) as well as truncate tokens ( #, ;, // ...) be more interesting? Otherwise, I'd suggest renaming this task to Truncate a String. Second (and this is just an idle idea more than anything else), a task for which a language stripped comments (per its own language's rules; // and # for PHP, // and /* */ for C++, etc) would be very interesting, as it combines demonstrating string processing as well as the language's own comment syntax. --Michael Mol 13:53, 30 October 2010 (UTC)

Wayward space

What should happen to the space before the comment marker? The task description seems to silently remove it. --Paddy3118 06:15, 28 November 2010 (UTC)