Skip to content

gomantics/sx

Repository files navigation

sx

Go Reference CI

A simple Go library for string case conversion. Converts between camelCase, PascalCase, kebab-case, snake_case, and more.

Installation

go get github.com/gomantics/sx

Documentation

For complete documentation, usage examples, and API reference, visit:

https://gomantics.dev/sx

Quick Example

import "github.com/gomantics/sx"

sx.CamelCase("hello-world")   // helloWorld
sx.PascalCase("hello_world")  // HelloWorld
sx.KebabCase("HelloWorld")    // hello-world
sx.SnakeCase("HelloWorld")    // hello_world

Acknowledgements

This library is highly inspired by scule - a fantastic JavaScript string case utility library by the UnJS team.

License

MIT