ProductPromotion
Logo

Go.Lang

made by https://0x3d.site

GitHub - codemodus/kace: Common case conversions covering common initialisms.
Common case conversions covering common initialisms. - codemodus/kace
Visit Site

GitHub - codemodus/kace: Common case conversions covering common initialisms.

GitHub - codemodus/kace: Common case conversions covering common initialisms.

kace

go get "github.com/codemodus/kace"

Package kace provides common case conversion functions which take into consideration common initialisms.

Usage

func Camel(s string) string
func Kebab(s string) string
func KebabUpper(s string) string
func Pascal(s string) string
func Snake(s string) string
func SnakeUpper(s string) string
type Kace
    func New(initialisms map[string]bool) (*Kace, error)
    func (k *Kace) Camel(s string) string
    func (k *Kace) Kebab(s string) string
    func (k *Kace) KebabUpper(s string) string
    func (k *Kace) Pascal(s string) string
    func (k *Kace) Snake(s string) string
    func (k *Kace) SnakeUpper(s string) string

Setup

import (
    "fmt"

    "github.com/codemodus/kace"
)

func main() {
    s := "this is a test sql."

    fmt.Println(kace.Camel(s))
    fmt.Println(kace.Pascal(s))

    fmt.Println(kace.Snake(s))
    fmt.Println(kace.SnakeUpper(s))

    fmt.Println(kace.Kebab(s))
    fmt.Println(kace.KebabUpper(s))

    customInitialisms := map[string]bool{
        "THIS": true,
    }
    k, err := kace.New(customInitialisms)
    if err != nil {
        // handle error
    }

    fmt.Println(k.Camel(s))
    fmt.Println(k.Pascal(s))

    fmt.Println(k.Snake(s))
    fmt.Println(k.SnakeUpper(s))

    fmt.Println(k.Kebab(s))
    fmt.Println(k.KebabUpper(s))

    // Output:
    // thisIsATestSQL
    // ThisIsATestSQL
    // this_is_a_test_sql
    // THIS_IS_A_TEST_SQL
    // this-is-a-test-sql
    // THIS-IS-A-TEST-SQL
    // thisIsATestSql
    // THISIsATestSql
    // this_is_a_test_sql
    // THIS_IS_A_TEST_SQL
    // this-is-a-test-sql
    // THIS-IS-A-TEST-SQL
}

More Info

TODO

Test Trie

Test the current trie.

Documentation

View the GoDoc

Benchmarks

benchmark                 iter       time/iter   bytes alloc        allocs
---------                 ----       ---------   -----------        ------
BenchmarkCamel4        2000000    947.00 ns/op      112 B/op   3 allocs/op
BenchmarkSnake4        2000000    696.00 ns/op      128 B/op   2 allocs/op
BenchmarkSnakeUpper4   2000000    679.00 ns/op      128 B/op   2 allocs/op
BenchmarkKebab4        2000000    691.00 ns/op      128 B/op   2 allocs/op
BenchmarkKebabUpper4   2000000    677.00 ns/op      128 B/op   2 allocs/op

Articles
to learn more about the golang concepts.

Resources
which are currently available to browse on.

mail [email protected] to add your project or resources here ๐Ÿ”ฅ.

FAQ's
to know more about the topic.

mail [email protected] to add your project or resources here ๐Ÿ”ฅ.

Queries
or most google FAQ's about GoLang.

mail [email protected] to add more queries here ๐Ÿ”.

More Sites
to check out once you're finished browsing here.

0x3d
https://www.0x3d.site/
0x3d is designed for aggregating information.
NodeJS
https://nodejs.0x3d.site/
NodeJS Online Directory
Cross Platform
https://cross-platform.0x3d.site/
Cross Platform Online Directory
Open Source
https://open-source.0x3d.site/
Open Source Online Directory
Analytics
https://analytics.0x3d.site/
Analytics Online Directory
JavaScript
https://javascript.0x3d.site/
JavaScript Online Directory
GoLang
https://golang.0x3d.site/
GoLang Online Directory
Python
https://python.0x3d.site/
Python Online Directory
Swift
https://swift.0x3d.site/
Swift Online Directory
Rust
https://rust.0x3d.site/
Rust Online Directory
Scala
https://scala.0x3d.site/
Scala Online Directory
Ruby
https://ruby.0x3d.site/
Ruby Online Directory
Clojure
https://clojure.0x3d.site/
Clojure Online Directory
Elixir
https://elixir.0x3d.site/
Elixir Online Directory
Elm
https://elm.0x3d.site/
Elm Online Directory
Lua
https://lua.0x3d.site/
Lua Online Directory
C Programming
https://c-programming.0x3d.site/
C Programming Online Directory
C++ Programming
https://cpp-programming.0x3d.site/
C++ Programming Online Directory
R Programming
https://r-programming.0x3d.site/
R Programming Online Directory
Perl
https://perl.0x3d.site/
Perl Online Directory
Java
https://java.0x3d.site/
Java Online Directory
Kotlin
https://kotlin.0x3d.site/
Kotlin Online Directory
PHP
https://php.0x3d.site/
PHP Online Directory
React JS
https://react.0x3d.site/
React JS Online Directory
Angular
https://angular.0x3d.site/
Angular JS Online Directory