Soenneker.Utils.Strings.HammingDistance 3.0.216

Prefix Reserved
There is a newer version of this package available.
See the version list below for details.
dotnet add package Soenneker.Utils.Strings.HammingDistance --version 3.0.216
                    
NuGet\Install-Package Soenneker.Utils.Strings.HammingDistance -Version 3.0.216
                    
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="Soenneker.Utils.Strings.HammingDistance" Version="3.0.216" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Soenneker.Utils.Strings.HammingDistance" Version="3.0.216" />
                    
Directory.Packages.props
<PackageReference Include="Soenneker.Utils.Strings.HammingDistance" />
                    
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 Soenneker.Utils.Strings.HammingDistance --version 3.0.216
                    
#r "nuget: Soenneker.Utils.Strings.HammingDistance, 3.0.216"
                    
#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 Soenneker.Utils.Strings.HammingDistance@3.0.216
                    
#: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=Soenneker.Utils.Strings.HammingDistance&version=3.0.216
                    
Install as a Cake Addin
#tool nuget:?package=Soenneker.Utils.Strings.HammingDistance&version=3.0.216
                    
Install as a Cake Tool

alternate text is missing from this package README image alternate text is missing from this package README image alternate text is missing from this package README image

alternate text is missing from this package README image Soenneker.Utils.Strings.HammingDistance

A utility library for comparing strings via the Hamming Distance algorithm

Installation

dotnet add package Soenneker.Utils.Strings.HammingDistance

Why Hamming Distance?

Hamming Distance is a simple yet powerful metric for comparing strings or sequences of equal length. It is especially useful in scenarios where exact alignment and positional differences matter, such as:

Positional Accuracy:

Hamming Distance identifies and quantifies differences at each specific position in two sequences.

Binary or Fixed-Length Data:

It is ideal for comparing fixed-length strings, binary data, or encoded sequences.

Lightweight and Efficient:

Hamming Distance has low computational overhead, making it well-suited for performance-critical applications.

Ideal for Error Detection:

It is commonly used in error detection and correction algorithms, like detecting bit-flip errors in transmitted data.


Usage

var text1 = "kitten";
var text2 = "sitten";

double similarityPercentage = HammingDistanceStringUtil.CalculatePercentage(text1, text2); // ~83.33

Note:

Hamming Distance requires strings of equal length. If the strings differ in length, an exception will be thrown to ensure valid comparisons.

Product Compatible and additional computed target framework versions.
.NET net9.0 is compatible.  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. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.
  • net9.0

    • No dependencies.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
4.0.302 124 11/6/2025
4.0.301 168 10/29/2025
3.0.300 191 9/3/2025
3.0.299 158 8/11/2025
3.0.298 121 6/27/2025
3.0.297 193 5/27/2025
3.0.296 197 5/22/2025
3.0.295 179 5/7/2025
3.0.294 170 5/5/2025
3.0.293 177 5/5/2025
3.0.292 172 5/5/2025
3.0.290 216 4/8/2025
3.0.289 206 4/8/2025
3.0.288 207 4/8/2025
3.0.287 215 4/8/2025
3.0.286 187 4/8/2025
3.0.285 203 4/7/2025
3.0.284 209 4/7/2025
3.0.283 185 4/7/2025
3.0.282 216 4/7/2025
3.0.281 225 4/7/2025
3.0.280 195 4/7/2025
3.0.279 190 4/6/2025
3.0.278 202 4/6/2025
3.0.277 213 4/6/2025
3.0.276 157 4/6/2025
3.0.275 184 4/6/2025
3.0.274 188 4/6/2025
3.0.273 137 4/6/2025
3.0.272 151 4/6/2025
3.0.271 128 4/5/2025
3.0.270 145 4/5/2025
3.0.269 123 4/5/2025
3.0.268 128 4/5/2025
3.0.267 192 4/4/2025
3.0.266 175 4/1/2025
3.0.265 212 3/31/2025
3.0.264 214 3/31/2025
3.0.263 132 3/29/2025
3.0.262 518 3/25/2025
3.0.261 520 3/25/2025
3.0.260 167 3/21/2025
3.0.259 166 3/21/2025
3.0.258 197 3/18/2025
3.0.257 201 3/18/2025
3.0.256 117 3/15/2025
3.0.255 106 3/15/2025
3.0.254 191 3/12/2025
3.0.253 211 3/12/2025
3.0.252 198 3/11/2025
3.0.251 196 3/11/2025
3.0.250 241 3/11/2025
3.0.249 223 3/11/2025
3.0.248 221 3/11/2025
3.0.247 262 3/7/2025
3.0.246 251 3/7/2025
3.0.245 148 3/2/2025
3.0.244 143 3/2/2025
3.0.243 120 3/2/2025
3.0.242 125 3/1/2025
3.0.241 147 3/1/2025
3.0.240 145 3/1/2025
3.0.239 147 3/1/2025
3.0.238 125 3/1/2025
3.0.237 123 3/1/2025
3.0.236 141 3/1/2025
3.0.235 136 2/25/2025
3.0.234 125 2/25/2025
3.0.233 139 2/25/2025
3.0.232 145 2/25/2025
3.0.231 152 2/23/2025
3.0.230 125 2/23/2025
3.0.229 116 2/22/2025
3.0.228 139 2/22/2025
3.0.227 159 2/22/2025
3.0.226 140 2/22/2025
3.0.225 126 2/22/2025
3.0.224 147 2/21/2025
3.0.223 151 2/21/2025
3.0.222 147 2/19/2025
3.0.221 145 2/19/2025
3.0.220 153 2/19/2025
3.0.219 155 2/18/2025
3.0.218 130 2/18/2025
3.0.217 141 2/18/2025
3.0.216 145 2/14/2025
3.0.215 139 2/14/2025
3.0.214 138 2/13/2025
3.0.213 134 2/12/2025
3.0.212 164 2/12/2025
3.0.211 163 2/12/2025
3.0.210 150 2/12/2025
3.0.209 122 2/12/2025
3.0.208 163 2/12/2025
3.0.207 149 2/11/2025
3.0.206 141 2/11/2025
3.0.205 137 2/11/2025
3.0.204 164 2/11/2025
3.0.203 155 2/11/2025
3.0.202 149 2/10/2025
3.0.201 152 2/10/2025
3.0.200 151 2/10/2025
3.0.199 136 2/10/2025
3.0.198 123 2/10/2025
3.0.197 149 2/9/2025
3.0.196 164 2/9/2025
3.0.195 127 2/8/2025
3.0.194 137 2/8/2025
3.0.193 125 2/7/2025
3.0.192 111 2/7/2025
3.0.191 144 2/7/2025
3.0.190 130 2/7/2025
3.0.188 156 2/7/2025
3.0.187 130 2/7/2025
3.0.186 142 2/7/2025
3.0.185 159 2/6/2025
3.0.184 145 2/5/2025
3.0.183 160 2/5/2025
3.0.182 118 2/5/2025
3.0.181 133 2/5/2025
3.0.180 135 2/5/2025
3.0.179 126 2/5/2025
3.0.178 153 2/5/2025
3.0.177 130 1/28/2025
3.0.176 137 1/28/2025
3.0.175 121 1/28/2025
3.0.174 142 1/28/2025
3.0.173 133 1/27/2025
3.0.172 144 1/27/2025
3.0.171 160 1/27/2025
3.0.170 130 1/26/2025
3.0.169 133 1/26/2025
3.0.168 138 1/26/2025
3.0.167 120 1/26/2025
3.0.166 114 1/25/2025
3.0.165 128 1/25/2025
3.0.164 144 1/25/2025
3.0.163 142 1/25/2025
3.0.162 123 1/25/2025
3.0.161 120 1/24/2025
3.0.160 135 1/24/2025
3.0.159 153 1/24/2025
3.0.158 138 1/24/2025
3.0.157 144 1/24/2025
3.0.156 134 1/24/2025
3.0.155 143 1/24/2025
3.0.154 142 1/24/2025
3.0.153 120 1/23/2025
3.0.152 131 1/21/2025
3.0.151 136 1/21/2025
3.0.150 147 1/21/2025
3.0.149 122 1/21/2025
3.0.148 148 1/21/2025
3.0.147 126 1/21/2025
3.0.146 127 1/21/2025
3.0.145 125 1/21/2025
3.0.144 126 1/21/2025
3.0.143 109 1/21/2025
3.0.142 153 1/20/2025
3.0.141 135 1/20/2025
3.0.140 129 1/20/2025
3.0.139 124 1/20/2025
3.0.138 138 1/20/2025
3.0.137 140 1/20/2025
3.0.136 129 1/20/2025
3.0.135 147 1/20/2025
3.0.134 134 1/19/2025
3.0.133 124 1/19/2025
3.0.132 129 1/19/2025
3.0.131 140 1/19/2025
3.0.130 131 1/19/2025
3.0.129 136 1/19/2025
3.0.128 144 1/18/2025
3.0.127 143 1/18/2025
3.0.126 141 1/17/2025
3.0.125 133 1/17/2025
3.0.124 139 1/17/2025
3.0.123 117 1/17/2025
3.0.122 143 1/16/2025
3.0.121 113 1/16/2025
3.0.120 146 1/16/2025
3.0.119 117 1/16/2025
3.0.118 118 1/16/2025
3.0.117 153 1/16/2025
3.0.116 126 1/16/2025
3.0.115 125 1/16/2025
3.0.114 138 1/15/2025
3.0.113 113 1/15/2025
3.0.112 130 1/15/2025
3.0.111 140 1/15/2025
3.0.110 97 1/15/2025
3.0.109 90 1/15/2025
3.0.108 117 1/15/2025
3.0.107 90 1/15/2025
3.0.106 126 1/14/2025
3.0.105 118 1/14/2025
3.0.104 132 1/13/2025
3.0.103 146 1/13/2025
3.0.102 128 1/13/2025
3.0.101 136 1/13/2025
3.0.100 137 1/12/2025
3.0.99 116 1/11/2025
3.0.98 123 1/11/2025
3.0.97 134 1/11/2025
3.0.96 141 1/11/2025
3.0.95 146 1/10/2025
3.0.94 123 1/10/2025
3.0.93 127 1/10/2025
3.0.92 122 1/10/2025
3.0.91 145 1/10/2025
3.0.90 184 1/3/2025
3.0.89 166 1/3/2025
3.0.88 129 1/3/2025
3.0.87 133 1/3/2025
3.0.86 137 1/2/2025
3.0.85 155 1/2/2025
3.0.84 135 1/2/2025
3.0.83 121 1/2/2025
3.0.82 146 1/1/2025
3.0.81 158 1/1/2025
3.0.80 142 1/1/2025
3.0.79 134 1/1/2025
3.0.78 176 1/1/2025
3.0.77 137 1/1/2025
3.0.76 164 12/31/2024
3.0.75 159 12/31/2024
3.0.74 165 12/31/2024
3.0.73 150 12/31/2024
3.0.72 139 12/31/2024
3.0.71 153 12/31/2024
3.0.70 144 12/31/2024
3.0.69 116 12/31/2024
3.0.68 161 12/31/2024
3.0.67 133 12/31/2024
3.0.66 140 12/30/2024
3.0.65 129 12/28/2024
3.0.64 148 12/28/2024
3.0.63 125 12/27/2024
3.0.62 149 12/27/2024
3.0.61 128 12/24/2024
3.0.60 145 12/24/2024
3.0.59 120 12/24/2024
3.0.58 153 12/24/2024
3.0.57 136 12/24/2024
3.0.56 122 12/24/2024
3.0.55 136 12/24/2024
3.0.54 119 12/24/2024
3.0.53 126 12/24/2024
3.0.52 137 12/23/2024
3.0.51 133 12/23/2024
3.0.50 150 12/23/2024
3.0.49 159 12/23/2024
3.0.48 154 12/23/2024
3.0.47 138 12/22/2024
3.0.46 145 12/22/2024
3.0.45 131 12/22/2024
3.0.44 140 12/22/2024
3.0.43 147 12/22/2024
3.0.42 137 12/21/2024
3.0.41 151 12/21/2024
3.0.40 124 12/21/2024
3.0.39 150 12/21/2024
3.0.38 132 12/21/2024
3.0.37 126 12/21/2024
3.0.36 130 12/21/2024
3.0.35 142 12/20/2024
3.0.34 141 12/20/2024
3.0.33 134 12/20/2024
3.0.32 129 12/20/2024
3.0.31 129 12/20/2024
3.0.30 135 12/19/2024
3.0.29 149 12/19/2024
3.0.28 129 12/19/2024
3.0.27 127 12/19/2024
3.0.26 129 12/18/2024
3.0.25 130 12/18/2024
3.0.24 125 12/16/2024
3.0.23 142 12/16/2024
3.0.22 128 12/10/2024
3.0.21 157 12/10/2024
3.0.20 132 12/9/2024
3.0.19 142 12/9/2024
3.0.18 156 12/9/2024
3.0.17 147 12/9/2024
3.0.16 121 12/9/2024
3.0.15 138 12/7/2024
3.0.14 161 12/6/2024
3.0.13 136 12/6/2024
3.0.12 128 12/6/2024
3.0.11 146 12/6/2024
3.0.10 138 12/6/2024
3.0.9 130 12/6/2024
3.0.8 125 12/6/2024
3.0.7 132 12/6/2024
3.0.6 137 12/6/2024
3.0.5 154 12/6/2024
3.0.4 134 12/5/2024
3.0.3 141 12/5/2024
3.0.2 134 12/4/2024
3.0.1 137 12/4/2024