Case conversion

StringKit-FP converts code-like identifiers using an ASCII/byte-oriented tokenizer. It recognises separators, a lower-to-upper transition, and a common acronym boundary. It does not segment Unicode grapheme clusters.

InputToSnakeCase
HelloWorldhello_world
XMLHttpRequestxml_http_request
HTTPRequesthttp_request
HTML5Parserhtml5_parser
IPv6Addressipv6_address
hello_worldhello_world
hello-worldhello_world
hello worldhello_world

Available converters#

FunctionExample result for hello world
ToCamelCasehelloWorld
ToPascalCaseHelloWorld
ToSnakeCasehello_world
ToKebabCasehello-world
ToTitleCaseHello World

Digits stay with the current token. An uppercase word after digits begins a new token, so HTML5Parser becomes html5_parser. Use the compiled identifier recipes program as the starting point.