parseGroupHeader

Retrieve group name from header entry.

@nogc @safe pure nothrow
parseGroupHeader
(
inout(char)[] s
)

Return Value

Type: auto

group name or empty string if the entry is not group header.

Examples

assert(parseGroupHeader("[Group name]") == "Group name");
assert(parseGroupHeader("NotGroupName") == string.init);

assert(parseGroupHeader("[Group name]".dup) == "Group name".dup);

Meta