Skip to content

Latest commit

 

History

History
23 lines (16 loc) · 424 Bytes

(4 kyu) Strip Comments.md

File metadata and controls

23 lines (16 loc) · 424 Bytes

Strip Comments (4 kyu)

https://www.codewars.com/kata/51c8e37cee245da6b40000bd

Complete the solution so that it strips all text that follows any of a set of comment markers passed in. Any whitespace at the end of the line should also be stripped out.

Example:

Given an input string of:

apples, pears # and bananas
grapes
bananas !apples

The output expected would be:

apples, pears
grapes
bananas