Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up

Golang pkg to convert any text input to camelCase, PascalCase or snake_case naming convention. Removes all whitespaces and special characters. Supports Unicode characters.

License

NotificationsYou must be signed in to change notification settings

golang-cz/textcase

Repository files navigation

GoDoc Widget

Golang pkg to convert any text input tocamelCase,PascalCase,snake_case orkebab-case naming convention. Removes all whitespaces and special characters. Supports Unicode characters.

Usage

import"github.com/golang-cz/textcase"textcase.CamelCase("Hello World!")// helloWorldtextcase.PascalCase("Hello World!")// HelloWorldtextcase.SnakeCase("Hello World!")// hello_worldtextcase.KebabCase("Hello World!")// hello-world

Unicode support

textcase.CamelCase("Háčky, čárky. Příliš žluťoučký kůň úpěl ďábelské ódy.")// háčkyČárkyPřílišŽluťoučkýKůňÚpělĎábelskéÓdy

Possible Unicode limitations

textcase.CamelCase("Here comes O'Brian")// hereComesOBrian

This package doesn't implement language-specific case mappers, such asgolang.org/x/text/cases, and thus comes with a similar limitation tostrings.Title(). But given the likely use cases of this package, we deliberately chose English versionhereComesOBrian overhereComesObrian for the aboveHere comes O'Brian input.

License

Licensed underMIT License

About

Golang pkg to convert any text input to camelCase, PascalCase or snake_case naming convention. Removes all whitespaces and special characters. Supports Unicode characters.

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages


[8]ページ先頭

©2009-2025 Movatter.jp