mstring

package
v0.0.0-...-0b61f1f Latest Latest
Warning

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

Go to latest
Published: Sep 3, 2020 License: MIT Imports: 8 Imported by: 1

Documentation

Index

Constants

View Source
const AsciiLetters string = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ"
View Source
const AsciiLowercase string = "abcdefghijklmnopqrstuvwxyz"
View Source
const AsciiUppercase string = "ABCDEFGHIJKLMNOPQRSTUVWXYZ"
View Source
const Digits string = "0123456789"
View Source
const HexDigits string = "0123456789abcdefABCDEF"
View Source
const OctDigits string = "01234567"
View Source
const Printable string = "" // Ref Python
View Source
const Punctuation string = "!\"#$%&'()*+,-./:;<=>?@[\\]^_`{|}~"
View Source
const Whitespace string = ""

Variables

View Source
var ErrSyntax = errors.New("invalid syntax")

Functions

func Abbreviate

func Abbreviate(s string, maxWidth int) (string, error)

func BytesToString

func BytesToString(b []byte) string

func Center

func Center(s string, width int, fillRune rune) string

func CountMatches

func CountMatches(s string, sub string) int

func Float64ToString

func Float64ToString()

TODO

func InsertByte

func InsertByte(s string, offset int, v byte) string

TODO

func InsertRune

func InsertRune(s string, offset int, v rune) string

TODO

func InsertString

func InsertString(s string, offset int, v string) string

func IntToString

func IntToString(i int) string

func IsAllLowerCase

func IsAllLowerCase(s string) bool

func IsAllUpperCase

func IsAllUpperCase(s string) bool

func IsAlpha

func IsAlpha(s string) bool

func IsAlphaSpace

func IsAlphaSpace(s string) bool

func IsAlphanumeric

func IsAlphanumeric(s string) bool

func IsAlphanumericSpace

func IsAlphanumericSpace(s string) bool

func IsAsciiPrintable

func IsAsciiPrintable(s string) bool

func IsBlank

func IsBlank(s string) bool

func IsEmpty

func IsEmpty(s string) bool

func IsNotEmpty

func IsNotEmpty(s string) bool

func IsNumeric

func IsNumeric(s string) bool

func IsNumericSpace

func IsNumericSpace(s string) bool

func IsURI

func IsURI(s string) bool

func IsWhiteSpace

func IsWhiteSpace(s string) bool

func Join

func Join(strs ...string) string

func Random

func Random(count int, s string) string

func RandomAlphabetic

func RandomAlphabetic(count int) string

func RandomAlphabeticLowercase

func RandomAlphabeticLowercase(count int) string

func RandomAlphabeticUppercase

func RandomAlphabeticUppercase(count int) string

func RandomAlphanumeric

func RandomAlphanumeric(count int) string

func RandomAlphanumericLowercase

func RandomAlphanumericLowercase(count int) string

func RandomAlphanumericUppercase

func RandomAlphanumericUppercase(count int) string

func RandomAlphanumericpunctuation

func RandomAlphanumericpunctuation(count int) string

func RandomNumeric

func RandomNumeric(count int) string

func Reverse

func Reverse(s string) string

func ReverseDelimited

func ReverseDelimited(s, sep string) string

func ReverseWords

func ReverseWords(s string) string

func Rotate

func Rotate(s string, shift int) string

func StringToBytes

func StringToBytes(s string) []byte

func StringToInt

func StringToInt(s string) (int, error)

func StringToRune

func StringToRune(s string) []rune

func SubString

func SubString(s string, beginIndex int, endIndex int)

TODO

func SwapCase

func SwapCase(s string) string

Types

This section is empty.

Jump to

Keyboard shortcuts

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