{"id":24803897,"url":"https://github.com/alsi-lawr/alsi.caseconversions","last_synced_at":"2026-02-27T00:04:26.390Z","repository":{"id":274852395,"uuid":"850094230","full_name":"alsi-lawr/alsi.caseconversions","owner":"alsi-lawr","description":"ALSI.CaseConversions is a .NET library that converts various string formats into other cases. It provides robust handling of different casing conventions, separators, and special characters, making it an ideal utility for consistent string formatting in your applications.","archived":false,"fork":false,"pushed_at":"2025-01-29T18:18:44.000Z","size":37,"stargazers_count":2,"open_issues_count":2,"forks_count":1,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-10-13T05:33:20.620Z","etag":null,"topics":["csharp","dotnet","nuget","nuget-package","open-source"],"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/alsi-lawr.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":null,"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":"2024-08-30T21:42:03.000Z","updated_at":"2025-01-29T18:17:57.000Z","dependencies_parsed_at":"2025-01-29T19:25:14.877Z","dependency_job_id":"b739c64e-5a5b-4a0f-88d4-51d5453ec921","html_url":"https://github.com/alsi-lawr/alsi.caseconversions","commit_stats":null,"previous_names":["alsi-lawr/alsi.caseconversions"],"tags_count":2,"template":false,"template_full_name":null,"purl":"pkg:github/alsi-lawr/alsi.caseconversions","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alsi-lawr%2Falsi.caseconversions","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alsi-lawr%2Falsi.caseconversions/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alsi-lawr%2Falsi.caseconversions/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alsi-lawr%2Falsi.caseconversions/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/alsi-lawr","download_url":"https://codeload.github.com/alsi-lawr/alsi.caseconversions/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alsi-lawr%2Falsi.caseconversions/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29878278,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-26T23:51:21.483Z","status":"ssl_error","status_checked_at":"2026-02-26T23:50:46.793Z","response_time":89,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"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","nuget-package","open-source"],"created_at":"2025-01-30T06:13:46.723Z","updated_at":"2026-02-27T00:04:26.359Z","avatar_url":"https://github.com/alsi-lawr.png","language":"C#","funding_links":[],"categories":[],"sub_categories":[],"readme":"# ALSI.CaseConversions\n\n[![NuGet Version](https://img.shields.io/nuget/v/ALSI.CaseConversions.svg?style=flat)](https://www.nuget.org/packages/ALSI.CaseConversions/)\n[![Build Status](https://github.com/alsi-lawr/alsi.caseconversions/actions/workflows/deploy-nuget.yml/badge.svg)](https://github.com/alsi-lawr/ALSI.CaseConversions/actions)\n[![Downloads](https://img.shields.io/nuget/dt/ALSI.CaseConversions.svg?logo=nuget\u0026logoSize=auto)](https://www.nuget.org/packages/ALSI.CaseConversions)\n[![codecov](https://codecov.io/gh/alsi-lawr/alsi.caseconversions/graph/badge.svg)](https://codecov.io/gh/alsi-lawr/alsi.caseconversions)\n\n**ALSI.CaseConversions** is a .NET library that converts various string formats into other cases. It provides robust handling of different casing conventions, separators, and special characters, making it an ideal utility for consistent string formatting in your applications.\n\n## Supported Case Conversions\n\n- **PascalCase**\n- **snake_case**\n- **camelCase**\n- **kebab-case**\n- **dot.case**\n- **MACRO_CASE**\n- **Sentence Case**\n\n## Getting Started\n\n### Installation\n\nInstall the NuGet package using the .NET CLI:\n\n```bash\ndotnet add package ALSI.CaseConversions\n```\n\nOr via the NuGet Package Manager:\n\n```bash\nInstall-Package ALSI.CaseConversions\n```\n\n### Usage\n\n#### Basic Example\n\n```csharp\nusing ALSI.CaseConversions;\n\nstring result = SnakeCase.Converter.Convert(\"HelloWorld\");\n// result: \"hello_world\"\n```\n\n#### Handling Various String Formats\n\nThe converters can handle can handle different types of input formats, using `snake_case` as an example:\n\n```csharp\n// PascalCase to snake_case\nvar pascalResult = SnakeCase.Converter.Convert(\"PascalCaseInput\");\n// pascalResult: \"pascal_case_input\"\n\n// camelCase to snake_case\nvar camelResult = SnakeCase.Converter.Convert(\"camelCaseInput\");\n// camelResult: \"camel_case_input\"\n\n// Hyphen-separated words\nvar hyphenResult = SnakeCase.Converter.Convert(\"Hello-World-Example\");\n// hyphenResult: \"hello_world_example\"\n\n// Dot-separated words\nvar dotResult = SnakeCase.Converter.Convert(\"Hello.World.Example\");\n// dotResult: \"hello_world_example\"\n\n// Mixed case with numbers\nvar mixedResult = SnakeCase.Converter.Convert(\"File123Name\");\n// mixedResult: \"file123_name\"\n```\n\n### Supported Conversions\n\n- **PascalCase**: `\"PascalCaseInput\"` → `\"pascal_case_input\"`\n- **camelCase**: `\"camelCaseInput\"` → `\"camel_case_input\"`\n- **Hyphenated Words**: `\"Hello-World-Example\"` → `\"hello_world_example\"`\n- **Dot-Separated Words**: `\"Hello.World.Example\"` → `\"hello_world_example\"`\n- **Whitespace-Separated Words**: `\"Hello World\"` → `\"hello_world\"`\n- **Mixed-Case with Numbers**: `\"File123Name\"` → `\"file123_name\"`\n- **Special Characters**: `\"Hello@world!\"` → `\"helloworld\"`\n- **Consecutive Uppercase Letters**: `\"XMLRequest\"` →`\"xml_request\"`.\n\n### Constraints\n\nThe conversion is limited by the following:\n\n- **Empty Strings**: Returns an empty string.\n- **Null Input**: Returns an empty string.\n- **Fast for small inputs**: For inputs \u003c= 128 characters, this is extremely fast, outperforming `System.Text.Json`. Beyond that, shared array buffers are used to attempt to retain performance improvements.\n- **ASCII-only**: Converting to snake case is an extended ASCII-only operation, limited to character hex codes 0x00 -\u003e 0xFF.\n\n## Contributing\n\nWe welcome contributions! Feel free to open an issue or submit a pull request on GitHub.\n\n### Building Locally\n\nClone the repository:\n\n```bash\ngit clone https://github.com/alsi-lawr/alsi.caseconversions.git\ncd ALSI.CaseConversions\n```\n\nBuild the project:\n\n```bash\ndotnet build\n```\n\nRun tests:\n\n```bash\ndotnet test\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Falsi-lawr%2Falsi.caseconversions","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Falsi-lawr%2Falsi.caseconversions","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Falsi-lawr%2Falsi.caseconversions/lists"}