Strip block comments: Difference between revisions
Content added Content deleted
m (→{{header|ALGOL W}}: corrected comments) |
m (→{{header|Nim}}: Pass delim argument to recursive call) |
||
Line 1,499: | Line 1,499: | ||
return txt |
return txt |
||
result = if i > 0: txt[0 .. |
result = if i > 0: txt[0 ..< i] else: "" |
||
let tmp = commentStripper(txt[i+delim.l.len .. txt.high]) |
let tmp = commentStripper(txt[i+delim.l.len .. txt.high], delim) |
||
let j = tmp.find(delim.r) |
let j = tmp.find(delim.r) |
||
assert j >= 0 |
assert j >= 0 |