str

package
v1.0.13 Latest Latest
Warning

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

Go to latest
Published: Nov 4, 2024 License: MIT Imports: 4 Imported by: 0

Documentation

Overview

Deprecated: This package is deprecated.Be instead of strlib

Index

Constants

This section is empty.

Variables

View Source
var DefaultTrimChars = string([]byte{
	'\t',
	'\v',
	'\n',
	'\r',
	'\f',
	' ',
	0x00,
	0x85,
	0xA0,
})

DefaultTrimChars are the characters which are stripped by Trim* functions in default. Deprecated:

Functions

func ContainHan deprecated

func ContainHan(str string) bool

Deprecated:

func Reverse

func Reverse(s string) string

Reverse returns string whose char order is reversed to the given string. Deprecated:

func StringOrEmpty deprecated

func StringOrEmpty(s *string) string

Deprecated:

func ToBool deprecated

func ToBool(s string, fn ...func(s string) bool) bool

Deprecated:

func ToFloat deprecated

func ToFloat[T constraints.Float](s string, missing T) T

Deprecated:

func ToInteger deprecated

func ToInteger[T constraints.Integer](s string, missing T) T

Deprecated:

func Trim

func Trim(str string, characterMask ...string) string

Trim strips whitespace (or other characters) from the beginning and end of a string. The optional parameter `characterMask` specifies the additional stripped characters. Deprecated:

Types

This section is empty.

Jump to

Keyboard shortcuts

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