private string CurrentLineTitle(string[] expectedPossiblePrefixes) { if (!CurrentLineStartsWithOneOf(expectedPossiblePrefixes, out var matchedPrefix)) { throw new InvalidOperationException(); } return(CurrentLineTrimmed.Substring(matchedPrefix.Length).Trim()); }
private bool CurrentLineStartsWith(string prefix) => (CurrentLineTrimmed?.StartsWith(prefix)).GetValueOrDefault(false);