strutil

package
v0.3.0 Latest Latest
Warning

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

Go to latest
Published: Dec 20, 2020 License: BSD-3-Clause Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ToCamelCase

func ToCamelCase(s string) string

ToCamelCase converts a s to CamelCase.

func ToDelimited

func ToDelimited(s string, del uint8) string

ToDelimited converts a s to delimited.snake.case (in this case `del = '.'`).

func ToKebab

func ToKebab(s string) string

ToKebab converts a s to kebab-case.

func ToLowerCamelCase

func ToLowerCamelCase(s string) string

ToLowerCamelCase converts a s to lower CamelCase.

func ToScreamingDelimited

func ToScreamingDelimited(s string, del uint8, screaming bool) (n string)

ToScreamingDelimited converts a s to SCREAMING.DELIMITED.SNAKE.CASE in this case `del = '.'; screaming = true`) or delimited.snake.case (in this case `del = '.'; screaming = false`.

func ToScreamingKebab

func ToScreamingKebab(s string) string

ToScreamingKebab converts a s to SCREAMING-KEBAB-CASE.

func ToScreamingSnakeCase

func ToScreamingSnakeCase(s string) string

ToScreamingSnakeCase converts a s to SCREAMING_SNAKE_CASE.

func ToSnakeCase

func ToSnakeCase(s string) string

ToSnakeCase converts a s to snake_case.

func UnsafeSlice

func UnsafeSlice(s string) (p []byte)

UnsafeSlice returns a byte array that points to the given string without a heap allocation. The string must be preserved until the byte arrayis disposed.

func UnsafeString

func UnsafeString(p []byte) (s string)

UnsafeString returns a string that points to the given byte array without a heap allocation. The byte array must be preserved until the string is disposed.

Types

This section is empty.

Jump to

Keyboard shortcuts

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