CommonPrefixes is a simple static library that evalutes a list of strings and returns a list of strings representing the common prefixes found amongst list members based on a user-specified delimiter.
If you have any issues or feedback, please file an issue here in Github. We'd love to have you help by contributing code for new features, optimization to the existing codebase, ideas for future releases, or fixes!
- Initial release
Refer to the Test
project for exercising the library.
using CommonPrefixes;
public static List<string> _Values = new List<string>
{
"/foo/",
"/foo/bar/",
"/foo/bar/file1",
"/foo/bar/file2"
};
List<string> prefixes = PrefixesFinder.Find(_Values, '/');
// List contains:
// /foo/
// /foo/bar/
Refer to CHANGELOG.md for version history.