{"id":27384032,"url":"https://github.com/rossmacarthur/anycase","last_synced_at":"2025-10-17T16:21:17.578Z","repository":{"id":84733077,"uuid":"606477756","full_name":"rossmacarthur/anycase","owner":"rossmacarthur","description":"💼 A case conversion library for Go and Python with Unicode support","archived":false,"fork":false,"pushed_at":"2025-03-31T15:53:42.000Z","size":101,"stargazers_count":23,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"trunk","last_synced_at":"2025-04-13T16:09:50.954Z","etag":null,"topics":["camelcase","go","python","snakecase"],"latest_commit_sha":null,"homepage":"","language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/rossmacarthur.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE-APACHE","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":"2023-02-25T16:03:51.000Z","updated_at":"2025-03-31T15:53:45.000Z","dependencies_parsed_at":"2024-10-31T21:12:01.358Z","dependency_job_id":"d8610700-e6fc-4185-974c-06551d9ffd52","html_url":"https://github.com/rossmacarthur/anycase","commit_stats":null,"previous_names":["rossmacarthur/anycase"],"tags_count":6,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rossmacarthur%2Fanycase","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rossmacarthur%2Fanycase/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rossmacarthur%2Fanycase/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rossmacarthur%2Fanycase/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/rossmacarthur","download_url":"https://codeload.github.com/rossmacarthur/anycase/tar.gz/refs/heads/trunk","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248741203,"owners_count":21154255,"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":["camelcase","go","python","snakecase"],"created_at":"2025-04-13T16:09:55.372Z","updated_at":"2025-10-17T16:21:17.573Z","avatar_url":"https://github.com/rossmacarthur.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"# anycase\n\nA case conversion library for [Go](#go), [Rust](#rust), and [Python](#python).\n\n\u003cimg src=\"https://github.com/rossmacarthur/anycase/assets/17109887/ab3a4c71-6090-49f3-a67f-b1ab395999c6\" width=\"500\"\u003e\n\nAnycase provides a consistent way of converting between different case styles.\nAnd has a similar API across languages.\n\n## Go\n\nInstall using\n\n```sh\ngo get -u github.com/rossmacarthur/anycase/go\n```\n\nNow convert a string using the relevant function.\n\n```go\nimport \"github.com/rossmacarthur/anycase/go\"\n\nanycase.ToSnake(\"XMLHttpRequest\") // returns \"xml_http_request\"\n```\n\n[View full documentation](./go).\n\n## Rust\n\nAdd the `anycase` crate to your Cargo manifest.\n\n```sh\ncargo add anycase\n```\n\nNow convert a string using the relevant function.\n\n```rust\nanycase::to_snake(\"XMLHttpRequest\"); // returns \"xml_http_request\"\n```\n\n[View full documentation](./rust).\n\n## Python\n\nInstall using\n\n```sh\npip install py-anycase\n```\n\nNow convert a string using the relevant function.\n\n```python\nimport anycase\n\nanycase.to_snake(\"XMLHttpRequest\") # returns \"xml_http_request\"\n```\n\n[View full documentation](./python).\n\n## How does it work?\n\nEach implementation divides the input string into words and applies a “word\nfunction” to each word and calls a “delimiter function” for each word\nboundary (the space between words).\n\nWord boundaries are defined as follows:\n\n- A set of consecutive non-letter/number/symbol e.g. `foo _bar` is two words\n  `foo` and `bar`.\n- A transition from a lowercase letter to an uppercase letter e.g. `fooBar`\n  is two words `foo` and `Bar`.\n- The second last uppercase letter in a word with multiple uppercase letters\n  e.g. `FOOBar` is two words `FOO` and `Bar`.\n\n## License\n\nThis project is distributed under the terms of both the MIT license and the\nApache License (Version 2.0).\n\nSee [LICENSE-APACHE](LICENSE-APACHE) and [LICENSE-MIT](LICENSE-MIT) for details.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frossmacarthur%2Fanycase","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frossmacarthur%2Fanycase","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frossmacarthur%2Fanycase/lists"}