{"id":31923646,"url":"https://github.com/fletcher/c-title-case","last_synced_at":"2025-10-13T23:56:09.913Z","repository":{"id":66885742,"uuid":"98311538","full_name":"fletcher/c-title-case","owner":"fletcher","description":"C implementation of John Gruber's title case Perl script","archived":false,"fork":false,"pushed_at":"2025-02-10T03:39:30.000Z","size":448,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-02-10T04:26:33.631Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"C","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/fletcher.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":"2017-07-25T13:51:24.000Z","updated_at":"2023-05-20T22:54:57.000Z","dependencies_parsed_at":"2024-07-20T22:25:33.631Z","dependency_job_id":null,"html_url":"https://github.com/fletcher/c-title-case","commit_stats":null,"previous_names":[],"tags_count":7,"template":false,"template_full_name":null,"purl":"pkg:github/fletcher/c-title-case","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fletcher%2Fc-title-case","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fletcher%2Fc-title-case/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fletcher%2Fc-title-case/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fletcher%2Fc-title-case/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/fletcher","download_url":"https://codeload.github.com/fletcher/c-title-case/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fletcher%2Fc-title-case/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":279017193,"owners_count":26086017,"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","status":"online","status_checked_at":"2025-10-13T02:00:06.723Z","response_time":61,"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":"2025-10-13T23:55:37.989Z","updated_at":"2025-10-13T23:56:09.906Z","avatar_url":"https://github.com/fletcher.png","language":"C","funding_links":[],"categories":[],"sub_categories":[],"readme":"## About ##\n\n|            |                           |  \n| ---------- | ------------------------- |  \n| Title:     | cTitleCase        |  \n| Author:    | Fletcher T. Penney       |  \n| Date:      | 2019-12-29 |  \n| Copyright: | Copyright © 2017-2019 Fletcher T. Penney.    |  \n| Version:   | 1.2.0      |  \n\n\n## Introduction ##\n\nMany years ago, John Gruber wrote a [Perl script] to apply title case rules to\ntext.  It was interesting, but I didn't have much use for it at the time.\nSubsequently, it was [improved] by Aristotle Pagaltzis.  Again, I didn't need\nit.\n\nWhen I created MultiMarkdown Composer, however, applying title case\nautomatically to headers seemed like a useful feature.  Perl didn't help me,\nthough, and I ended up discovering Marshall Elfstrand's [Objective-C] version.\nThis allowed me to incorporate the functionality directly (once I fixed a\ncouple of bugs).\n\nI finally decided that it was time for a proper c implementation to make the\nalgorithm more portable.\n\n\n## Use ##\n\ncTitleCase can be used in two ways:\n\n1. As a library (`libTitleCase`) in your own program.  You use either\n`title_case_string()` or `title_case_string_len()` depending on whether you\nknow the string's length or not.  Free the resulting string when you're\nfinished with it.\n\n2. As a command line program (`titlecase`).  It can accept a title from the\ncommand line or from `stdin`.  It can only accept a single line of text.\n\n\t* `titlecase \"this is a title\"`\n\t* `titlecase \u003c title_file.txt`\n\n\nI included the [test examples] that Aristotle Pagaltzis compiled (includes John\nGruber's original test examples), and it passes all of them.\n\n\n## Development ##\n\nThis is a new implementation.  I use `re2c` to create a tokenizer that\nrecognizes words of different types, as well as punctuation that starts sub-\nsentences and sub-phrases.  The program then walks through the tokens to\ndetermine how to modify each word.\n\nIt's a relatively simple program, but still may contain bugs.  If you discover\nany, please let me know.\n\nThat said, this program is not going to work perfectly for every title.  It's\nlimited to English.  Your mileage may vary....\n\n\n## License ##\n \nThe `c-template` project is released under the MIT License.\n\nd_string.c and d_string.h are from the MultiMarkdown v4 project:\n\n\thttps://github.com/fletcher/MultiMarkdown-4/\n\nMMD 4 is released under both the MIT License and GPL.\n\n\nCuTest is released under the zlib/libpng license. See CuTest.c for the text\nof the license.\n\n\n## The MIT License ##\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in\nall copies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\nTHE SOFTWARE.\n\n\n[Perl script]:\thttps://daringfireball.net/2008/05/title_case\n[improved]:\thttp://plasmasturm.org/code/titlecase/\n[Objective-C]:\thttp://www.vengefulcow.com/titlecase/\n[test examples]:\thttps://raw.githubusercontent.com/ap/titlecase/master/test.pl\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffletcher%2Fc-title-case","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ffletcher%2Fc-title-case","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffletcher%2Fc-title-case/lists"}