strs

package
v0.0.0-...-a16d59f Latest Latest
Warning

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

Go to latest
Published: May 27, 2024 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Format

func Format(tpl string, args map[string]any) string

Format: tpl: "Hello ${name}" {name: "World"} -> "Hello World"

func FormatTpl

func FormatTpl(s string, args map[string]any) string

FormatTpl format string with text/template

func ParseSize

func ParseSize(sizeStr string) ([]int, error)

ParseSize 200x300 -> [200,300],200->[200,200]

func ParseSizes

func ParseSizes(sizesStr string) ([][]int, error)

ParseSizes 600x800,200x300, -> [[600,800],[200,300]],200->[[200,200]]

func ToInt64s

func ToInt64s(ss []string) []int64

func ToInts

func ToInts(ss []string) []int

func ToIntsDefault

func ToIntsDefault(s string, dv ...int) int

func ToString

func ToString[T constraints.Integer](ints []T) []string

Types

This section is empty.

Jump to

Keyboard shortcuts

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