PrefixContainer Class¶
Summary¶
This is a container for prefix values. It normalizes all the values into dotted-form and then stores them in a sorted array. All queries for prefixes are also normalized to dotted-form, and searches for ContainsPrefix are done with a binary search.
Constructors¶
-
PrefixContainer
(System.Collections.Generic.ICollection<System.String>)¶ Arguments: - values (System.Collections.Generic.ICollection{System.String}) –
public PrefixContainer(ICollection<string> values)
-
Methods¶
-
ContainsPrefix
(System.String)¶ Arguments: - prefix (System.String) –
Return type: System.Boolean
public bool ContainsPrefix(string prefix)
-
GetKeysFromPrefix
(System.String)¶ Arguments: - prefix (System.String) –
Return type: System.Collections.Generic.IDictionary{System.String,System.String}
public IDictionary<string, string> GetKeysFromPrefix(string prefix)
-
IsPrefixMatch
(System.String, System.String)¶ Arguments: - prefix (System.String) –
- testString (System.String) –
Return type: System.Boolean
public static bool IsPrefixMatch(string prefix, string testString)
-