formalUsage

fnstring formalUsage(string section)

Converts a usage section to a formal pattern string.

Transforms usage lines into a pattern with alternatives.

Parameters

sectionThe usage section text.

Returns

A formal pattern string with alternatives separated by |.