示例#1
0
        private string CurrentLineTitle(string[] expectedPossiblePrefixes)
        {
            if (!CurrentLineStartsWithOneOf(expectedPossiblePrefixes, out var matchedPrefix))
            {
                throw new InvalidOperationException();
            }

            return(CurrentLineTrimmed.Substring(matchedPrefix.Length).Trim());
        }
示例#2
0
 private bool CurrentLineStartsWith(string prefix)
 => (CurrentLineTrimmed?.StartsWith(prefix)).GetValueOrDefault(false);