{"id":20605104,"url":"https://github.com/arnab-developer/arc.stringsanitizer","last_synced_at":"2026-04-29T16:39:36.827Z","repository":{"id":42478579,"uuid":"395962634","full_name":"Arnab-Developer/Arc.StringSanitizer","owner":"Arnab-Developer","description":"This library is to sanitize and unsanitize string","archived":false,"fork":false,"pushed_at":"2023-09-25T04:55:04.000Z","size":49,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-01-17T02:24:08.362Z","etag":null,"topics":["csharp","dotnet","nuget"],"latest_commit_sha":null,"homepage":"","language":"C#","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Arnab-Developer.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.txt","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2021-08-14T09:46:03.000Z","updated_at":"2024-01-09T12:00:41.000Z","dependencies_parsed_at":"2024-11-16T09:37:08.612Z","dependency_job_id":null,"html_url":"https://github.com/Arnab-Developer/Arc.StringSanitizer","commit_stats":{"total_commits":51,"total_committers":1,"mean_commits":51.0,"dds":0.0,"last_synced_commit":"0fe558302dadd09eadfd92cbc220deb386bac779"},"previous_names":[],"tags_count":12,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Arnab-Developer%2FArc.StringSanitizer","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Arnab-Developer%2FArc.StringSanitizer/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Arnab-Developer%2FArc.StringSanitizer/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Arnab-Developer%2FArc.StringSanitizer/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Arnab-Developer","download_url":"https://codeload.github.com/Arnab-Developer/Arc.StringSanitizer/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":242250932,"owners_count":20096895,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["csharp","dotnet","nuget"],"created_at":"2024-11-16T09:26:30.698Z","updated_at":"2026-04-29T16:39:36.784Z","avatar_url":"https://github.com/Arnab-Developer.png","language":"C#","funding_links":[],"categories":[],"sub_categories":[],"readme":"# String sanitizer\n\nThis library is to sanitize and unsanitize string.\n\nSuppose 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.\n\nThis 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.\n\nYou can get this from [NuGet](https://www.nuget.org/packages/Arc.StringSanitizer).\n\n## How to use\n\nTo sanitize a string:\n\n```csharp\nvar unsanitizedString = \"sample test with special char. some more \u0026nbsp; char\";\n\nvar sanitizerConfigs = new List\u003cSanitizerConfig\u003e()\n{\n    new SanitizerConfig(\"special char\", \"[sc]\"),\n    new SanitizerConfig(\"\u0026nbsp;\", \"[html space]\")\n};\n\nvar sanitizedString = unsanitizedString.Sanitize(sanitizerConfigs);\nConsole.WriteLine(sanitizedString);\n\n// Output: sample test with [sc]. some more [html space] char\n```\n\nTo unsanitize a string:\n\n```csharp\nvar sanitizedString = \"sample test with [sc]. some more [html space] char\";\n\nvar sanitizerConfigs = new List\u003cSanitizerConfig\u003e()\n{\n    new SanitizerConfig(\"special char\", \"[sc]\"),\n    new SanitizerConfig(\"\u0026nbsp;\", \"[html space]\")\n};\n\nvar unsanitizedString = sanitizedString.Unsanitize(sanitizerConfigs);\nConsole.WriteLine(unsanitizedString);\n\n// Output: sample test with special char. some more \u0026nbsp; char\n```","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Farnab-developer%2Farc.stringsanitizer","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Farnab-developer%2Farc.stringsanitizer","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Farnab-developer%2Farc.stringsanitizer/lists"}