BeeneticToolkit.Text 0.13.0

dotnet add package BeeneticToolkit.Text --version 0.13.0
                    
NuGet\Install-Package BeeneticToolkit.Text -Version 0.13.0
                    
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="BeeneticToolkit.Text" Version="0.13.0" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="BeeneticToolkit.Text" Version="0.13.0" />
                    
Directory.Packages.props
<PackageReference Include="BeeneticToolkit.Text" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add BeeneticToolkit.Text --version 0.13.0
                    
#r "nuget: BeeneticToolkit.Text, 0.13.0"
                    
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package BeeneticToolkit.Text@0.13.0
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=BeeneticToolkit.Text&version=0.13.0
                    
Install as a Cake Addin
#tool nuget:?package=BeeneticToolkit.Text&version=0.13.0
                    
Install as a Cake Tool

BeeneticToolkit.Text

NuGet Downloads License: MIT

Checks for player-entered text: display names, statuses, and chat lines. Pure .NET with no dependencies and no engine types, so the same check runs in Unity, in a dotnet test harness, and on a C# server.

Targets netstandard2.1 and net8.0.

Install

dotnet add package BeeneticToolkit.Text

Word filter

WordFilter matches text against a tiered WordList and sees through the usual disguises: case, accents, Cyrillic and Greek lookalikes, styled and enclosed Unicode letters (bold, script, circled, fullwidth), leet (sh1t, a$$), stretched letters (baaad), and separators (b.a.d). It also refuses control, zero-width, and direction characters, and checks length per field.

using BeeneticToolkit.Text;

var list = new WordList(
    anywhere: new[] { "badword" },        // matched anywhere, across word breaks
    word:     new[] { "bad" },            // matched as a whole word only, so "badge" is fine
    allow:    new[] { "badminton" },      // always fine, even though it contains an entry
    reserved: new[] { "admin", "mod" });  // names must not contain these

var filter = new WordFilter(list);

var nameRules   = new WordFilterRules(minLength: 3, maxLength: 20, checkReserved: true);
var statusRules = new WordFilterRules(minLength: 0, maxLength: 60, checkReserved: false);

filter.Check("B4D", nameRules);         // WordFilterVerdict.Word
filter.Check("TheAdmin", nameRules);    // WordFilterVerdict.Reserved
filter.Check("TheAdmin", statusRules);  // WordFilterVerdict.Ok
filter.Check("ab", nameRules);          // WordFilterVerdict.Length

Verdicts come back in rule order (Characters for a blank text, then Length, Characters, Word, Reserved), so you can show the player which rule they hit. Every list entry is lowercase a to z; the filter does the folding. A filter is immutable and thread-safe: build one per list and share it.

The word list

This package ships no list. Bring your own and build a WordList from it however you load data. A common starting point is the LDNOOBW English list, which is licensed CC BY 4.0: if you use it, keep its attribution with your copy and credit it in your game. Expect to tune it: move short entries that occur inside innocent words from anywhere to word, and add the false positives your players hit to allow.

A client-side check is advice to the player. Anything that matters should be checked again where the text is stored.

License

Licensed under the MIT License.

Product Compatible and additional computed target framework versions.
.NET net5.0 was computed.  net5.0-windows was computed.  net6.0 was computed.  net6.0-android was computed.  net6.0-ios was computed.  net6.0-maccatalyst was computed.  net6.0-macos was computed.  net6.0-tvos was computed.  net6.0-windows was computed.  net7.0 was computed.  net7.0-android was computed.  net7.0-ios was computed.  net7.0-maccatalyst was computed.  net7.0-macos was computed.  net7.0-tvos was computed.  net7.0-windows was computed.  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.  net9.0 was computed.  net9.0-android was computed.  net9.0-browser was computed.  net9.0-ios was computed.  net9.0-maccatalyst was computed.  net9.0-macos was computed.  net9.0-tvos was computed.  net9.0-windows was computed.  net10.0 was computed.  net10.0-android was computed.  net10.0-browser was computed.  net10.0-ios was computed.  net10.0-maccatalyst was computed.  net10.0-macos was computed.  net10.0-tvos was computed.  net10.0-windows was computed. 
.NET Core netcoreapp3.0 was computed.  netcoreapp3.1 was computed. 
.NET Standard netstandard2.1 is compatible. 
MonoAndroid monoandroid was computed. 
MonoMac monomac was computed. 
MonoTouch monotouch was computed. 
Tizen tizen60 was computed. 
Xamarin.iOS xamarinios was computed. 
Xamarin.Mac xamarinmac was computed. 
Xamarin.TVOS xamarintvos was computed. 
Xamarin.WatchOS xamarinwatchos was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.
  • .NETStandard 2.1

    • No dependencies.
  • net8.0

    • No dependencies.

NuGet packages (1)

Showing the top 1 NuGet packages that depend on BeeneticToolkit.Text:

Package Downloads
BeeneticToolkit

Meta-package that references the full BeeneticToolkit family: BeeneticToolkit.Random, BeeneticToolkit.Collections, BeeneticToolkit.Numerics, BeeneticToolkit.Logging, BeeneticToolkit.Spatial, BeeneticToolkit.BigMath, and BeeneticToolkit.Text. Install this to get everything, or install the individual packages to take only what you need.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
0.13.0 133 11/5/2026