{"id":22725095,"url":"https://github.com/katmore/case-convert","last_synced_at":"2026-07-11T07:02:15.333Z","repository":{"id":147654443,"uuid":"147873111","full_name":"katmore/case-convert","owner":"katmore","description":"case coversion library","archived":false,"fork":false,"pushed_at":"2018-09-08T03:19:27.000Z","size":52,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-10-28T21:43:45.264Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"PHP","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/katmore.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","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":"2018-09-07T20:45:57.000Z","updated_at":"2018-09-08T03:19:28.000Z","dependencies_parsed_at":"2023-04-09T07:15:39.801Z","dependency_job_id":null,"html_url":"https://github.com/katmore/case-convert","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/katmore/case-convert","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/katmore%2Fcase-convert","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/katmore%2Fcase-convert/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/katmore%2Fcase-convert/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/katmore%2Fcase-convert/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/katmore","download_url":"https://codeload.github.com/katmore/case-convert/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/katmore%2Fcase-convert/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":35353670,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-07-11T02:00:05.354Z","response_time":104,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"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":[],"created_at":"2024-12-10T15:08:50.791Z","updated_at":"2026-07-11T07:02:15.328Z","avatar_url":"https://github.com/katmore.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"# case-convert - ALPHA (NOT READY)\ncase coversion library\n\n## Title Casing\n\n### The title casing problem in PHP\n\nPHP does not have any convenient \"built-in\" means of converting a text string value to \"title case\" format (also known as \"proper case\"). The few candidate functions in official PHP extensions do not properly adhere to any known English style guide for title casing. In fact, as demonstrated below, they do nothing different than the [`ucwords()`](https://php.net/ucwords) function!\n\nTake the example of the phrase `i am the other one`, which SHOULD be `I am the Other One` when _properly_ title cased.\n\n#### INCORRECT title casing with [`ucwords()`](https://php.net/ucwords)\n```php\necho ucwords(\"i am the other one\");\n/* --output--\nI Am The Other One\n*/\n```\n\n#### INCORRECT title casing with `mb_convert_case()`\nThe [`mb_convert_case()`](https://php.net/mb_convert_case) function, part of the [*mbstring* extension](https://php.net/manual/en/ref.mbstring.php), produces the same identically incorrect results as [`ucwords()`](https://php.net/ucwords).\n```php\necho mb_convert_case(\"i am the other one\",MB_CASE_TITLE);\n/* --output--\nI Am The Other One\n*/\n```\n\n#### INCORRECT title casing with `IntlBreakIterator::createTitleInstance()`\nThe [`IntlBreakIterator`](https://php.net/manual/en/class.intlbreakiterator.php) of the [*intl* extension](https://php.net/manual/en/book.intl.php) disapoints as well. Besides offering an absurdly tedious to interface to apply to this purpose, it ultimately provides incorrect results when using the `IntlBreakIterator::createTitleInstance()` method (identical to using [`ucwords()`](https://php.net/ucwords)).\n```php\n$text = \"i am the other one\";\n$titleIterator = IntlBreakIterator::createTitleInstance(\"en-US\");\n$titleIterator-\u003esetText($text);\nforeach($titleIterator as $boundary) {\n        if (strlen($text)-1\u003c$boundary) break 1;\n        $text[$boundary] = strtoupper($text[$boundary]);\n}\necho $text;\n/* --output--\nI Am The Other One\n*/\n```\n\n## Legal\n### Copyright\nhttps://github.com/katmore/case-convert\n\nCopyright (c) 2018 D. Bird. All Rights Reserved.\n\n### License\nCase-convert is copyrighted free software.\nYou may redistribute and modify it under either the terms and conditions of the\n\"The MIT License (MIT)\"; or the terms and conditions of the \"GPL v3 License\".\nSee [LICENSE](https://github.com/katmore/case-convert/blob/master/LICENSE) and [GPLv3](https://github.com/katmore/case-convert/blob/master/GPLv3).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkatmore%2Fcase-convert","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fkatmore%2Fcase-convert","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkatmore%2Fcase-convert/lists"}