strings

package
v0.0.0-...-fb5fdcc Latest Latest
Warning

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

Go to latest
Published: Dec 14, 2023 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

View Source
const (
	STR_PAD_RIGHT = 0b01
	STR_PAD_LEFT  = 0b10
	STR_PAD_BOTH  = 0b11
)

Variables

This section is empty.

Functions

func Pad

func Pad[T interface {
	int | uint | int8 | uint8 | int16 | uint16 | int32 | uint32 | int64 | uint64 | string
}](s T, padLength int, padStr string, padType int) string

Pad 使用另一个字符串填充字符串为指定长度 s 是输入的值 如果 padLength 的值是负数,小于或者等于输入字符串的长度,不会发生任何填充,并会返回 s 。

Types

type Duration

type Duration struct {
}

type Order

type Order struct {
	// contains filtered or unexported fields
}

func (*Order) MarshalJSON

func (o *Order) MarshalJSON() ([]byte, error)

func (*Order) String

func (o *Order) String() string

func (*Order) UnmarshalJSON

func (o *Order) UnmarshalJSON(data []byte) error

type OrderField

type OrderField struct {
	// field 字段名称
	Field string
	// IsASC 是否正序排序
	IsASC bool
}

Jump to

Keyboard shortcuts

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