kebabcase

package module
v0.0.0-...-eac43a6 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 23, 2019 License: BSD-3-Clause Imports: 2 Imported by: 0

Documentation

Overview

Package kebabcase provides a parser for identifier names using kebab-case naming convention.

Reference: https://en.wikipedia.org/wiki/Naming_convention_(programming)#Multiple-word_identifiers.

Example (KebabCaseToMixedCaps)
package main

import (
	"fmt"

	"dmitri.shuralyov.com/text/kebabcase"
)

func main() {
	fmt.Println(kebabcase.Parse("client-mutation-id").ToMixedCaps())

}
Output:

ClientMutationID

Index

Examples

Constants

This section is empty.

Variables

This section is empty.

Functions

func Parse

func Parse(name string) ident.Name

Parse parses a kebab-case identifier name.

E.g., "client-mutation-id" -> {"client", "mutation", "id"}.

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL