isComment

Test whether the string s represents a comment.

@nogc @safe pure nothrow
bool
isComment
(
const(char)[] s
)

Examples

assert( isComment("# Comment"));
assert( isComment("   # Comment"));
assert(!isComment("Not comment"));
assert(!isComment(""));

Meta