Table of Contents

Interface IStringCollection

Namespace
AlgorithmsSW.String
Assembly
AlgorithmsSW.dll

Provides operations for a collection of strings (often, the keys of a symbol table).

public interface IStringCollection
Extension Methods

Properties

SupportsEmptyKeys

Returns true if the symbol table supports empty keys; otherwise, false.

bool SupportsEmptyKeys { get; }

Property Value

bool

Methods

KeysThatMatch(string)

Returns all keys in the symbol table that match the given pattern.

IEnumerable<string> KeysThatMatch(string pattern)

Parameters

pattern string

The pattern used to search for keys.

Returns

IEnumerable<string>

KeysWithPrefix(string)

Returns all keys in the symbol table that have the given prefix.

IEnumerable<string> KeysWithPrefix(string prefix)

Parameters

prefix string

The prefix used to search for keys.

Returns

IEnumerable<string>

LongestPrefixOf(string)

Returns the longest string that is a prefix of the given string.

string? LongestPrefixOf(string str)

Parameters

str string

Returns

string

The longest string that is a prefix of the given string; null if no keys are a prefix of the given string.