stringlib

package
v1.2.5 Latest Latest
Warning

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

Go to latest
Published: Feb 22, 2022 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Capitalize

func Capitalize(str string) string

Capitalize 字符首字母大写

func SnakeString

func SnakeString(s string) string

SnakeString XxYy to xx_yy , XxYY to xx_yy 驼峰字符串 转换为 蛇形字符串,例如: XxYy to xx_yy , XxYY to xx_yy

func ToCamel

func ToCamel()

* 驼峰式命名法 驼峰式命名又叫小驼峰命名法。第一个单词字母小写,后面其他单词首字母大写。

ex: int myAge; char myName[10]; float manHeight;

func ToFloat64

func ToFloat64(str string) (i float64, e error)

ToInt64

func ToHungary

func ToHungary()

* 匈牙利命名 开头字母用变量类型的缩写,其余部分用变量的英文或英文的缩写,要求单词第一个字母大写。

ex: int iMyAge; “i”是int类型的缩写 char cMyName[10]; “c”是char类型的缩写 float fManHeight; “f”是flota类型的缩写

func ToInt

func ToInt(str string) (i int, e error)

ToInt

func ToInt64

func ToInt64(str string) (i int64, e error)

ToInt64

func ToPascal

func ToPascal(name string) (res string)

* 帕斯卡命名法又叫大驼峰命名法。每个单词的第一个字母都大写。

ex: int MyAge; char MyName[10]; float ManHeight;

Types

This section is empty.

Jump to

Keyboard shortcuts

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