Acronym in the middle of a name, to snake_case
- Input
- getHTTPResponse
- Expected output
- get_http_response
HTTP is one word, separated from Response by the last-capital rule.
convert camelCase to snake_case
The conversion has two steps: first the name is split into words, then rewritten in the chosen format. The hard part is the first step, with acronyms such as XML, digits as in user_id2 and underscores at the ends.
HTTP is one word, separated from Response by the last-capital rule.
XML, Http and Request are the three detected words.
The first word stays lowercase and the others start with a capital.
All-caps text is not treated as an acronym.
Turn on Keep acronyms to preserve iOS in camelCase.
Sentence case capitalizes only the first letter of each sentence. Title Case applies a style guide: content words capitalized, short articles, prepositions and conjunctions lowercase. Capitalize Each Word just capitalizes the first letter of every word and leaves the rest alone, like CSS capitalize.
In camelCase the first letter is lowercase (userName); in PascalCase it is capitalized too (UserName). PascalCase usually names classes and types, camelCase names variables and methods.
Use Code mode: it converts every compound identifier in the snippet and leaves strings, comments and reserved words untouched. Review the result before using it, since names coming from libraries should not be renamed.
Accents are kept, or transliterated to ASCII if you turn off Keep accents (açaí becomes acai). Digits stay attached to the word, and an option splits them (user2id becomes user_2_id).
Every letter in capitals. Some letters grow: ß becomes SS.
The result shows up here.