Smab.DictionaryOfWords
1.0.5
See the version list below for details.
dotnet add package Smab.DictionaryOfWords --version 1.0.5
NuGet\Install-Package Smab.DictionaryOfWords -Version 1.0.5
<PackageReference Include="Smab.DictionaryOfWords" Version="1.0.5" />
paket add Smab.DictionaryOfWords --version 1.0.5
#r "nuget: Smab.DictionaryOfWords, 1.0.5"
// Install Smab.DictionaryOfWords as a Cake Addin #addin nuget:?package=Smab.DictionaryOfWords&version=1.0.5 // Install Smab.DictionaryOfWords as a Cake Tool #tool nuget:?package=Smab.DictionaryOfWords&version=1.0.5
Smab.DictionaryOfWords
A .NET 8.0 library used to check the spelling of words.
Documentation
Initialisation
3 ways to initialise the dictionary:
With a file of words, 1 word per line.
string filename = "path to file"; DictionaryOfWords dictionary = new(filename);
With a collection of strings
IEnumerable<string> words = ["a", "list", "of", "words"]; DictionaryOfWords dictionary = new(words);
Words can be manually add using
AddWord()
.DictionaryOfWords dictionary = new(); dictionary.AddWord("this"); dictionary.AddWord("is"); dictionary.AddWord("a"); dictionary.AddWord("word");
Asynchronously using
CreateAsync()
IEnumerable<string> words = ["a", "list", "of", "words"]; DictionaryOfWords dictionary = await DictionaryOfWords.CreateAsync(words);
Status
Once a dictionary has been created there are 2 ways that can be used to check if the words have loaded correctly:
- HasWords
Returns True if the dictionary has more than 1 word.
bool hasWords = dictionary.HasWords;
- Count
Returns the number of words loaded into the dictionary.
int count = dictionary.Count;
Check Spelling
Words can be checked using the IsWord()
method.
Returns true
if the word exists in the dictionary, otherwise false
.
bool isWord = dictionary.IsWord("word");
Product | Versions Compatible and additional computed target framework versions. |
---|---|
.NET | net8.0 is compatible. net8.0-android was computed. net8.0-browser was computed. net8.0-ios was computed. net8.0-maccatalyst was computed. net8.0-macos was computed. net8.0-tvos was computed. net8.0-windows was computed. |
-
net8.0
- No dependencies.
NuGet packages (1)
Showing the top 1 NuGet packages that depend on Smab.DictionaryOfWords:
Package | Downloads |
---|---|
Smab.DiceAndTiles
Library to handle dice and tiles for use in games |
GitHub repositories
This package is not used by any popular GitHub repositories.