str

package
v1.2.3 Latest Latest
Warning

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

Go to latest
Published: Oct 8, 2023 License: AGPL-3.0 Imports: 8 Imported by: 0

Documentation

Overview

Package str 字符串辅助方法

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Camel

func Camel(s string) string

Camel 转为 CamelCase,如 topic_comment -> TopicComment

func Camel2Case added in v1.2.2

func Camel2Case(name string) string

func Case2Camel added in v1.2.2

func Case2Camel(name string) string

func LowerCamel

func LowerCamel(s string) string

LowerCamel 转为 lowerCamelCase,如 TopicComment -> topicComment

func Plural

func Plural(word string) string

Plural 转为复数 user -> users

func Random added in v1.2.2

func Random(length int) string

func Singular

func Singular(word string) string

Singular 转为单数 users -> user

func Snake

func Snake(s string) string

Snake 转为 snake_case,如 TopicComment -> topic_comment

Types

type Buffer added in v1.2.2

type Buffer struct {
	*bytes.Buffer
}

func NewBuffer added in v1.2.2

func NewBuffer() *Buffer

func (*Buffer) Append added in v1.2.2

func (b *Buffer) Append(i interface{}) *Buffer

Jump to

Keyboard shortcuts

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