Beispiel #1
0
 public static bool HasPrefix(string text, Prefix prefix)
 {
     return(Regex.IsMatch(text, prefix.Condition));
 }
Beispiel #2
0
 public bool Equals(Prefix other)
 {
     return(string.Equals(_prefix, other._prefix) && string.Equals(_condition, other._condition));
 }
 internal Prefix GetPrefix(string text)
 {
     return(DefaultPrefixes.FirstOrDefault(prefix => Prefix.HasPrefix(text, prefix)));
 }