跳到主要内容
uencoder

转换 between camelCase, snake_case, kebab-case, and PascalCase

Transform identifiers 之间 naming conventions used 通过不同 languages 和 contexts.

  1. 1

    不同 languages 偏好不同 conventions: camelCase 为 JS/Java, snake_case 为 Python/Rust, kebab-情况为 CSS/URLs, PascalCase 为 types/classes. Converting 之间它们是 mechanical 但错误-prone 通过 hand.

  2. 2
    命名约定转换器 →

    Paste identifier 在任何约定. tool detects 源约定和 输出所有其他: camelCase, snake_case, kebab-情况, PascalCase, UPPER_CASE, dot.情况.

  3. 3
    大小写转换器 →

    为 bulk 文本 conversion (不仅 identifiers), use 此 tool 到转换整个 strings 之间 cases.

  4. 4
    text-trim → case-convert → sort-unique

    Use 链接到 normalize 列表的 identifiers 到 one 约定和 排序它们 — useful 为 generating consistent API 字段 names 或 enum values.

常见问题

如何是 字 boundaries detected?
通过 camelCase transitions (lowercase→uppercase), underscores, hyphens, 和 spaces. Consecutive uppercase letters (e.g. 'HTTPServer') 是 treated as acronym: 'HTTP' + 'Server'. tool handles 常见 patterns 但 ambiguous cases (single-letter words) 可以 need 手动审查.
将 conversion preserve acronyms?
基础 converters lowercase 一切然后 re-情况, losing acronym casing (HTTPServer → httpServer). Smarter converters preserve recognized acronyms. Check 输出和 manually fix acronyms 如果 needed.

解决此任务的工作流

相关工具