Arc.StringSanitizer
1.0.1
See the version list below for details.
dotnet add package Arc.StringSanitizer --version 1.0.1
NuGet\Install-Package Arc.StringSanitizer -Version 1.0.1
<PackageReference Include="Arc.StringSanitizer" Version="1.0.1" />
<PackageVersion Include="Arc.StringSanitizer" Version="1.0.1" />
<PackageReference Include="Arc.StringSanitizer" />
paket add Arc.StringSanitizer --version 1.0.1
#r "nuget: Arc.StringSanitizer, 1.0.1"
#addin nuget:?package=Arc.StringSanitizer&version=1.0.1
#tool nuget:?package=Arc.StringSanitizer&version=1.0.1
String sanitizer
This library is to sanitize and unsanitize string. It is created with .NET 5 and Visual Studo 2019.
Suppose you are working on a string and there are some special chars in it for that you can't work with that string. Then you need to replace those special chars to anything simple chars with which you can work with the string. Also when you are done then you may need to revert them to get back to the previous state of the string.
This library helps you to do that. You can create a config with details like which special chars need to be replaced with which simple chars and call the sanitize method. When your work with the string will complete then you can revert all the sanitization by calling the unsanitize method of this library.
You can get this library from NuGet.
dotnet add package Arc.StringSanitizer
To sanitize a string:
string unsanitizedString =
"sample test with special char. some more char";
List<SanitizerConfig> sanitizerConfigs = new()
{
new SanitizerConfig("special char", "[sc]"),
new SanitizerConfig(" ", "[html space]")
};
string sanitizedString = unsanitizedString.Sanitize(sanitizerConfigs);
To unsanitize a string:
string sanitizedString =
"sample test with [sc]. some more [html space] char";
List<SanitizerConfig> sanitizerConfigs = new()
{
new SanitizerConfig("special char", "[sc]"),
new SanitizerConfig(" ", "[html space]")
};
string unsanitizedString = sanitizedString.Unsanitize(sanitizerConfigs);
Product | Versions Compatible and additional computed target framework versions. |
---|---|
.NET | net5.0 is compatible. 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 was computed. 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. |
-
net5.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.
Add readme for NuGet