← 返回
未分类 中文

Case Convert

Convert text between different case styles. Use when the user asks to convert text to camelCase, snake_case, kebab-case, PascalCase, UPPERCASE, lowercase, Ti...
将文本在不同命名格式之间转换,如驼峰式、下划线式、连字符式、帕斯卡式、全大写、全小写、标题式等。
ohernandez-dev-blossom
未分类 clawhub v1.0.0 1 版本 100000 Key: 无需
★ 0
Stars
📥 468
下载
💾 1
安装
1
版本
#latest

概述

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. lowercases.toLowerCase()

Example: hello world example

  1. UPPERCASEs.toUpperCase()

Example: HELLO WORLD EXAMPLE

  1. 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)

  1. Sentence case — Lowercase everything; capitalize first letter of each sentence (after ., !, ? followed by whitespace, and the very first character)

Example: Hello world example. Another sentence.

  1. camelCase — Remove non-word characters (replace with space), trim, lowercase, then uppercase the first letter of every subsequent word, remove all spaces

Example: helloWorldExample

  1. PascalCase — Same as camelCase but also capitalize the very first letter

Example: HelloWorldExample

  1. snake_case — Lowercase, remove non-word non-space characters, replace spaces with _, collapse consecutive _

Example: hello_world_example

  1. kebab-case — Lowercase, remove non-word non-space characters, replace spaces with -, collapse consecutive -

Example: hello-world-example

  1. CONSTANT_CASE — Uppercase, remove non-word non-space characters, replace spaces with _, collapse consecutive _

Example: HELLO_WORLD_EXAMPLE

  1. dot.case — Lowercase, remove non-word non-space characters, replace spaces with ., collapse consecutive .

Example: hello.world.example

  1. path/case — Lowercase, remove non-word non-space characters, replace spaces with /, collapse consecutive /

Example: hello/world/example

  1. iNVERSE cASE — For each character: if uppercase → lowercase, if lowercase → uppercase, else unchanged

Example: hELLO wORLD eXAMPLE

  1. aLtErNaTe CaSe — For each character at index i: if i is even → lowercase, if i is odd → uppercase

Example: hElLo wOrLd eXaMpLe

  1. esreveR — Reverse the entire string character by character

Example: elpmaxE dlroW olleH

  1. SpOnGeBoB cAsE — Iterate through alphabetic characters only, alternating upper/lower (non-alphabetic characters pass through unchanged, but do NOT advance the alternation counter)

Example: hElLo WoRlD eXaMpLe

Options

  • target — specific case name (if omitted, output all 15)
  • batchMode — if true, apply the transformation to each line independently

Examples

Request: "Convert 'hello world' to camelCase"

Output: helloWorld


Request: "Convert 'USER_LOGIN_COUNT' to all cases"

Output:

  • lowercase: user_login_count
  • UPPERCASE: USER_LOGIN_COUNT
  • Title Case: User_login_count
  • Sentence case: User_login_count
  • camelCase: userLoginCount
  • PascalCase: UserLoginCount
  • snake_case: user_login_count
  • kebab-case: user-login-count
  • CONSTANT_CASE: USER_LOGIN_COUNT
  • dot.case: user.login.count
  • path/case: user/login/count
  • iNVERSE cASE: user_login_count
  • aLtErNaTe CaSe: uSeR_lOgIn_cOuNt
  • esreveR: TNUOC_NIGOL_RESU
  • SpOnGeBoB cAsE: uSeR_lOgIn_cOuNt

Request: "snake_case this: 'My Component Name'"

Output: my_component_name

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

版本历史

共 1 个版本

  • v1.0.0 当前
    2026-03-31 04:17 安全 安全

安全检测

腾讯云安全 (Keen)

安全,无风险
查看报告

腾讯云安全 (Sanbu)

安全,无风险
查看报告

🔗 相关推荐

Shared Brain

ohernandez-dev-blossom
跨多个AI代理的共享持久记忆层。适用于首次设置多代理工作空间,或代理发现永久...
★ 0 📥 437

Base64 Encode

ohernandez-dev-blossom
使用 Base64、URL 百分号编码或 HTML 实体对文本进行编码或解码。当用户请求编码、解码、Base64 编码/解码、URL 编码等操作时使用。
★ 0 📥 421

Json Format

ohernandez-dev-blossom
格式化、美化、压缩或验证 JSON。当用户需要格式化、美化、压缩、验证 JSON 数据时使用。
★ 0 📥 537