Case Converter
Convert text between 15 different case styles simultaneously.
Input
- - The text to convert
- Optionally, the target case style (if not specified, show all 15)
Output
- - The converted text in the requested case style(s)
- If no target specified, show all 15 transformations
Instructions
Apply each transformation exactly as follows:
- 1. lowercase — INLINECODE0
Example: INLINECODE1
- 2. UPPERCASE — INLINECODE2
Example: INLINECODE3
- 3. Title Case — Capitalize each word EXCEPT articles/prepositions when not first:
Small words (keep lowercase unless first): a, an, and, as, at, but, by, for, in, nor, of, on, or, so, the, to, up, yet, via, with
Always capitalize: first word of the string, first word after
.,
!,
?
Example:
Hello World Example (but:
The Art of War)
- 4. Sentence case — Lowercase everything; capitalize first letter of each sentence (after
., !, ? followed by whitespace, and the very first character)
Example: INLINECODE12
- 5. camelCase — Remove non-word characters (replace with space), trim, lowercase, then uppercase the first letter of every subsequent word, remove all spaces
Example: INLINECODE13
- 6. PascalCase — Same as camelCase but also capitalize the very first letter
Example: INLINECODE14
- 7. snake_case — Lowercase, remove non-word non-space characters, replace spaces with
_, collapse consecutive INLINECODE16
Example: INLINECODE17
- 8. kebab-case — Lowercase, remove non-word non-space characters, replace spaces with
-, collapse consecutive INLINECODE19
Example: INLINECODE20
- 9. CONSTANT_CASE — Uppercase, remove non-word non-space characters, replace spaces with
_, collapse consecutive INLINECODE22
Example: INLINECODE23
- 10. dot.case — Lowercase, remove non-word non-space characters, replace spaces with
., collapse consecutive INLINECODE25
Example: INLINECODE26
- 11. path/case — Lowercase, remove non-word non-space characters, replace spaces with
/, collapse consecutive INLINECODE28
Example: INLINECODE29
- 12. iNVERSE cASE — For each character: if uppercase → lowercase, if lowercase → uppercase, else unchanged
Example: INLINECODE30
- 13. aLtErNaTe CaSe — For each character at index i: if i is even → lowercase, if i is odd → uppercase
Example: INLINECODE31
- 14. esreveR — Reverse the entire string character by character
Example: INLINECODE32
- 15. SpOnGeBoB cAsE — Iterate through alphabetic characters only, alternating upper/lower (non-alphabetic characters pass through unchanged, but do NOT advance the alternation counter)
Example: INLINECODE33
Options
- -
target — specific case name (if omitted, output all 15) - INLINECODE35 — if true, apply the transformation to each line independently
Examples
Request: "Convert 'hello world' to camelCase"
Output: helloWorld
Request: "Convert 'USER
LOGINCOUNT' to all cases"
Output:
- - lowercase: INLINECODE37
- UPPERCASE: INLINECODE38
- Title Case: INLINECODE39
- Sentence case: INLINECODE40
- camelCase: INLINECODE41
- PascalCase: INLINECODE42
- snakecase: INLINECODE43
- kebab-case: INLINECODE44
- CONSTANTCASE: INLINECODE45
- dot.case: INLINECODE46
- path/case: INLINECODE47
- iNVERSE cASE: INLINECODE48
- aLtErNaTe CaSe: INLINECODE49
- esreveR: INLINECODE50
- SpOnGeBoB cAsE: INLINECODE51
Request: "snake_case this: 'My Component Name'"
Output: INLINECODE52
Error Handling
- - If input is empty, return an empty string for all cases
- If target case style is not recognized, list all 15 available styles and ask which one the user wants
- For very long inputs (>10,000 characters), process normally but note the length
大小写转换器
同时在15种不同的大小写风格之间转换文本。
输入
- - 要转换的文本
- 可选:目标大小写风格(如果未指定,则显示全部15种)
输出
- - 按请求的大小写风格转换后的文本
- 如果未指定目标,则显示全部15种转换结果
操作说明
严格按照以下方式应用每种转换:
- 1. 全小写 — s.toLowerCase()
示例:hello world example
- 2. 全大写 — s.toUpperCase()
示例:HELLO WORLD EXAMPLE
- 3. 标题大小写 — 每个单词首字母大写,但冠词/介词不在首位时除外:
小写单词(除非在首位):a, an, and, as, at, but, by, for, in, nor, of, on, or, so, the, to, up, yet, via, with
始终大写:字符串的第一个单词,以及.、!、?后的第一个单词
示例:Hello World Example(但:The Art of War)
- 4. 句子大小写 — 全部小写;每个句子的首字母大写(在.、!、?后跟空格处,以及第一个字符)
示例:Hello world example. Another sentence.
- 5. 驼峰式 — 移除非单词字符(替换为空格),修剪,转小写,然后将后续每个单词的首字母大写,移除所有空格
示例:helloWorldExample
- 6. 帕斯卡式 — 与驼峰式相同,但第一个字母也大写
示例:HelloWorldExample
- 7. 蛇形式 — 转小写,移除非单词非空格字符,将空格替换为,合并连续的
示例:hello
worldexample
- 8. 串式 — 转小写,移除非单词非空格字符,将空格替换为-,合并连续的-
示例:hello-world-example
- 9. 常量式 — 转大写,移除非单词非空格字符,将空格替换为,合并连续的
示例:HELLO
WORLDEXAMPLE
- 10. 点式 — 转小写,移除非单词非空格字符,将空格替换为.,合并连续的.
示例:hello.world.example
- 11. 路径式 — 转小写,移除非单词非空格字符,将空格替换为/,合并连续的/
示例:hello/world/example
- 12. 反转大小写 — 每个字符:大写→小写,小写→大写,其他不变
示例:hELLO wORLD eXAMPLE
- 13. 交替大小写 — 索引i处的每个字符:i为偶数→小写,i为奇数→大写
示例:hElLo wOrLd eXaMpLe
- 14. 反转 — 逐个字符反转整个字符串
示例:elpmaxE dlroW olleH
- 15. 海绵宝宝大小写 — 仅遍历字母字符,交替大小写(非字母字符保持不变,但不推进交替计数器)
示例:hElLo WoRlD eXaMpLe
选项
- - target — 特定大小写名称(如果省略,则输出全部15种)
- batchMode — 如果为true,则对每一行独立应用转换
示例
请求: 将hello world转换为驼峰式
输出: helloWorld
请求: 将USER
LOGINCOUNT转换为所有大小写
输出:
- - 全小写:userlogincount
- 全大写:USERLOGINCOUNT
- 标题大小写:Userlogincount
- 句子大小写:Userlogincount
- 驼峰式:userLoginCount
- 帕斯卡式:UserLoginCount
- 蛇形式:userlogincount
- 串式:user-login-count
- 常量式:USERLOGINCOUNT
- 点式:user.login.count
- 路径式:user/login/count
- 反转大小写:userlogincount
- 交替大小写:uSeRlOgIncOuNt
- 反转:TNUOCNIGOLRESU
- 海绵宝宝大小写:uSeRlOgIncOuNt
请求: 蛇形式转换:My Component Name
输出: mycomponentname
错误处理
- - 如果输入为空,所有大小写返回空字符串
- 如果目标大小写风格无法识别,列出全部15种可用风格并询问用户需要哪一种
- 对于超长输入(超过10,000个字符),正常处理但注明长度