{"id":48495387,"url":"https://github.com/lintalist/titlecase","last_synced_at":"2026-04-07T12:02:03.815Z","repository":{"id":77666003,"uuid":"156991037","full_name":"lintalist/TitleCase","owner":"lintalist","description":"TitleCase() mixed case (capital case, headline style) function for AutoHotkey","archived":false,"fork":false,"pushed_at":"2020-01-14T22:57:24.000Z","size":15,"stargazers_count":4,"open_issues_count":0,"forks_count":3,"subscribers_count":1,"default_branch":"master","last_synced_at":"2023-10-20T21:17:27.101Z","etag":null,"topics":["ahk","autohotkey","capital-case","headline-style","titlecase"],"latest_commit_sha":null,"homepage":"https://autohotkey.com/boards/viewtopic.php?f=6\u0026t=58981","language":"AutoHotkey","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/lintalist.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}},"created_at":"2018-11-10T14:55:16.000Z","updated_at":"2023-10-20T21:17:27.430Z","dependencies_parsed_at":"2023-03-03T20:00:32.796Z","dependency_job_id":null,"html_url":"https://github.com/lintalist/TitleCase","commit_stats":null,"previous_names":[],"tags_count":0,"template":null,"template_full_name":null,"purl":"pkg:github/lintalist/TitleCase","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lintalist%2FTitleCase","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lintalist%2FTitleCase/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lintalist%2FTitleCase/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lintalist%2FTitleCase/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/lintalist","download_url":"https://codeload.github.com/lintalist/TitleCase/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lintalist%2FTitleCase/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31511785,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-07T03:10:19.677Z","status":"ssl_error","status_checked_at":"2026-04-07T03:10:13.982Z","response_time":105,"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":["ahk","autohotkey","capital-case","headline-style","titlecase"],"created_at":"2026-04-07T12:01:53.894Z","updated_at":"2026-04-07T12:02:03.809Z","avatar_url":"https://github.com/lintalist.png","language":"AutoHotkey","funding_links":[],"categories":[],"sub_categories":[],"readme":"﻿# TitleCase - capital case, headline style function for AutoHotkey\n\n**Purpose**: Title case (capital case, headline style)\u003csup\u003e[1]\u003c/sup\u003e, example  \n\n\"The Quick Brown Fox Jumps over the Lazy Dog\"\n\n\u003csup\u003e[1]\u003c/sup\u003e A mixed-case style with all words capitalised, except for certain subsets  \n-- https://en.wikipedia.org/wiki/Letter_case#Title_case\n\nAutoHotkey forum thread: https://autohotkey.com/boards/viewtopic.php?f=6\u0026t=58981\n\n## Usage\n\n    TitleCase(Text[,lang=\"en\",ini=\"TitleCase.ini\"])\n\n**Options:**\n\n_Text_\n\n\u003e The string to convert to TitleCase.\n\t\n_lang_\n\n\u003e Language (or actually \"SECTION\") to use (reads from ini). Default \"en\" (for English). You can add your own sections (see below).\n\n_ini_\n\n\u003e Ini-file to use. Default is `TitleCase.ini`. If there is no INI present in `A_ScriptDir` it will create a default one, with \"en\" only.\n\n## How it works\n\nThe text is transformed first to AutoHotkey Title case format using [StringLower](https://autohotkey.com/docs/commands/StringLower.htm)  \nSo \"GONE with the WIND\" would become \"Gone With The Wind\"\n\nAfter that several (find and replace) functions are called to process exceptions in the order as outlined below in the INI setup.\n\nIni setup - All keys are CSV lists apart from the find and replace pairs defined by _find _replace:\n\n```ini\n[lang]\nLowerCaseList=            words you would prefer to have lowercase: a,and,is,the,etc [1]\nUpperCaseList=            words you would prefer to have uppercase: AHK,IBM,UK\nMixedCaseList=            words you would prefer to have MixedCase: AutoHotkey,iPhone\nExceptionsList=           [2]\nAlwaysLowerCaseList=      final check to ensure that any of the actions above haven't transformed specific words\nOrdinalIndicator_Find=    Regular Expression to FIND\nOrdinalIndicator_Replace= Regular Expression to REPLACE (see ordinal below)\nHypen1_Find=\nHypen1_Replace=\nHypen2_Find=\nHypen2_Replace=\n\n```\n\n[1] Also does: ```RegExReplace(Text, \"im)([’'`])s\",\"$1s\")``` ; to prevent grocer'S   \n[2] Also does: ```RegExReplace(Text, \"im)[\\.:;] \\K([a-z])\",\"$U{1}\")``` ; first letter after .:; uppercase\n\n## Pairs\n\nApart from the CSV lists you can also define find and replace pairs in the INI to handle special use cases such as Ordinal numbers.\n\nYou can define a pair by using the same keyword and append \"_find\" and \"_replace\", example:\n\n```ini\nHypen1_Find   =im)-\\K(.)\nHypen1_Replace=$U{1}\n```\n\nThese pairs are regular expessions and are used as follows:\n\n    Text:=RegExReplace(Text,pair_find,pair_replace)\n\n### Ordinal Numbers\n\n\"Ordinal numbers may be written in English with numerals and letter suffixes: 1st, 2nd or 2d, 3rd or 3d, 4th, 11th, 21st, 101st, 477th, etc., with the suffix acting as an ordinal indicator.\"  \n-- https://en.wikipedia.org/wiki/Ordinal_numeral\n\nEnglish is included by default, a possible example for French is provided below.\n\n#### English\n\n```ini\nOrdinalIndicator_Find=im)\\b(\\d+)(st|nd|rd|th)\\b\nOrdinalIndicator_Replace=$1$L{2}\n```\n\n#### French\n\n```ini\nOrdinalIndicator_Find=im)\\b(\\d+)(er|re|e)\\b\nOrdinalIndicator_Replace=$1$L{2}\n```\n\n## Languages\n\nThe ini-file can have multiple [Sections] for specific languages or situations. Or you can prepare a different INI file for each situation.\n\nNote: If you prepare your own ini files be sure to use UTF-16 encoded files to ensure proper processing of Unicode / extended ASCII characters. See the AutoHotkey [IniRead](https://autohotkey.com/docs/commands/IniRead.htm) documentation.\n\n## Examples:\n\n(with default TitleCase.ini and English)\n\nIn : autohotkey voted best scripting language in the world: IBM survey  \nOut: AutoHotkey Voted Best Scripting Language in the World: IBM Survey\n\nIn : the QUICK BROWN fox jumps over the lazy dog  \nOut: The Quick Brown Fox Jumps over the Lazy Dog\n\nIn : Get help with using AutoHotkey and its commands and hotkeys  \nOut: Get Help with Using AutoHotkey and its Commands and Hotkeys\n\nIn : Post your working scripts, libraries and tools  \nOut: Post Your Working Scripts, Libraries and Tools\n\nIn : Helpful script writing tricks and HowTo's  \nOut: Helpful Script Writing Tricks and Howto's\n\nIn : Discuss features, issues, about Editors for AHK  \nOut: Discuss Features, Issues, About Editors for AHK\n\nIn : AUTOHOTKEY IS THE 1ST SCRIPTING LANGUAGE WITH HOTKEYS and has User-contributed features  \nOut: AutoHotkey is the 1st Scripting Language with Hotkeys and Has User-Contributed Features\n\nCopyright Lintalist. See license.txt\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flintalist%2Ftitlecase","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Flintalist%2Ftitlecase","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flintalist%2Ftitlecase/lists"}