strings2

package
v0.1.12 Latest Latest
Warning

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

Go to latest
Published: Sep 26, 2022 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func IsAlNumString

func IsAlNumString(s string) bool

IsAlNumString returns true if an alpha numeric string consists of characters a-zA-Z0-9

https://github.com/nebulaim/telegramd/issues/99

there are some issue in username validation 1 - issue : username can be only numeric [must check first character for alphabet] 2 - issue :underscore not allowed [must edit IsAlNumString and add underscore support to it.

by the way underscore can't repeat without any character between them. for example s_a_b_a. ]

func JoinInt32List

func JoinInt32List(s []int32, sep string) string

func JoinInt32s

func JoinInt32s(is []int32, p string) string

JoinInt32s format int32 slice like:n1,n2,n3.

func JoinInt64List

func JoinInt64List(s []int64, sep string) string

func JoinInt64s

func JoinInt64s(is []int64, p string) string

JoinInt64s format int64 slice like:n1,n2,n3.

func JoinUint32List

func JoinUint32List(s []uint32, sep string) string

func JoinUint64List

func JoinUint64List(s []uint64, sep string) string

func SplitInt32s

func SplitInt32s(s, p string) ([]int32, error)

SplitInt32s split string into int32 slice.

func SplitInt64s

func SplitInt64s(s, p string) ([]int64, error)

SplitInt64s split string into int64 slice.

Types

This section is empty.

Jump to

Keyboard shortcuts

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