snake

package
v1.1.2 Latest Latest
Warning

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

Go to latest
Published: Nov 29, 2025 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Overview

Package snake provides functions for converting strings between camelCase and snake_case formats.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ToLower

func ToLower(s string) string

ToLower converts a camelCase string to a lowercase snake_case string.

For example, "fooBar" is converted to "foo_bar", and so is "FOOBar". Note that digits do not induce transitions, so "foo1" becomes "FOO1".

func ToUpper

func ToUpper(s string) string

ToUpper converts a camelCase string to an uppercase SNAKE_CASE string.

For example, "fooBar" is converted to "FOO_BAR", and so is "FOOBar". Note that digits do not induce transitions, so "foo1" becomes "FOO1".

Types

This section is empty.

Jump to

Keyboard shortcuts

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