str

package
v0.0.0-...-796898b Latest Latest
Warning

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

Go to latest
Published: Sep 18, 2019 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Overview

Package str 字符串类型工具类

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Convert

func Convert(oriString string) string

Convert 下划线转换,首字母小写变大写, 下划线去掉并将下划线后的首字母大写

func IsEmpty

func IsEmpty(s string) bool

IsEmpty 判断字符串是否为空,是则返回true,否则返回false

func IsNotEmpty

func IsNotEmpty(s string) bool

IsNotEmpty 和 IsEmpty 的语义相反

func RandSeq

func RandSeq(n int) string

RandSeq 创建指定长度的随机字符串

func RandSeq16

func RandSeq16() string

RandSeq16 创建长度为16的随机字符串

func SingleSpace

func SingleSpace(res string) string

SingleSpace 将字符串内所有连续空格替换为单个空格

func ToString

func ToString(i interface{}) string

ToString 将对象格式化成字符串

func Trim

func Trim(str string) string

Trim 去除字符串中的空格和换行符

func TrimN

func TrimN(str string) string

TrimN 去除字符串中的换行符

Types

This section is empty.

Jump to

Keyboard shortcuts

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