ctfeFindSection
private fn
string ctfeFindSection(string name, string source) @safe pureExtracts a section block (e.g. "usage:" or "options:") from a doc string.
The search is case-insensitive and operates purely on slices so it can run during CTFE. The returned string is trimmed of leading/trailing whitespace.
Parameters
name | Section name, including trailing colon (e.g. "usage:"). |
source | Documentation text. |
Returns
The matched section text or an empty string if not found.