strutils

package module
v0.0.0-...-157d32a Latest Latest
Warning

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

Go to latest
Published: May 23, 2023 License: MIT Imports: 17 Imported by: 0

README

strutils

A strings utility library for Golang

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CalcTokens

func CalcTokens(text string) int

func CheckCodeFormat

func CheckCodeFormat(content string) bool

检查激活码格式是否正确

func FormatTimeStamp

func FormatTimeStamp(timestamp int64) string

func GenOrderNo

func GenOrderNo() string

func GenPaySignature

func GenPaySignature(data, nonceStr, certKeyFilePath string) string

微信支付jsapi签名生成

func GenRandomString

func GenRandomString(length int) string

func GenUUID

func GenUUID() string

func GetCode

func GetCode(content string, length int) string

匹配兑换码

func GetTrialCode

func GetTrialCode(content string) string

func ReadCertKeyFile

func ReadCertKeyFile(path string) (*rsa.PrivateKey, error)

func ReplaceRepeatingSubstrings

func ReplaceRepeatingSubstrings(text string, repeat int) string

Remove continuous repeating substrings @param text string @param repeat int

func StringToSlice

func StringToSlice(s string) []rune

Types

This section is empty.

Jump to

Keyboard shortcuts

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