private PatternMatchKind GetKind(CamelCaseResult result) => PatternMatcher.GetCamelCaseKind(result, _candidateHumps);
public static PatternMatch?GetFirstMatch(this PatternMatcher matcher, string candidate) { using var matches = TemporaryArray <PatternMatch> .Empty; matcher.AddMatches(candidate, ref matches.AsRef()); return(matches.Count > 0 ? matches[0] : null); }
public static bool Matches(this PatternMatcher matcher, string candidate) => matcher.GetFirstMatch(candidate) != null;
public static bool Matches(this PatternMatcher matcher, [NotNullWhen(true)] string?candidate) => matcher.GetFirstMatch(candidate) != null;