How it works
Input is first split back into individual words — recognizing spaces, underscores, hyphens, and the capital letters inside camelCase or PascalCase — and then rejoined using the target case’s own rules for capitalization and separators.
Why re-split instead of just reformatting?
Converting kebab-case directly to snake*case is just swapping - for *,
but going from snake_case to camelCase needs to know where each word starts
and ends. Splitting to words first means every case can convert cleanly to
every other, not just the pairs that happen to share a separator.
Common uses
Turning a spec’s Field Name into a fieldName for code, converting a
database column like created_at into CreatedAt, or reformatting a
constant name for a different language’s conventions.