strutil

package
v0.23.2 Latest Latest
Warning

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

Go to latest
Published: Feb 12, 2024 License: Apache-2.0 Imports: 3 Imported by: 1 module, 2 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AppendInt

func AppendInt(b []byte, x int, width int) []byte

AppendInt appends the decimal form of x to b and returns the result. If the decimal form is shorter than width, the result is padded with leading 0's. If the decimal is longer than width, returns formatted decimal without any truncation.

func JoinIDs

func JoinIDs[T ~int | ~int32 | ~int64](prefix string, ids []T) string

JoinIDs joins a slice of any ids into a comma separated string. Each ID could be prefixed with a string (e.g. n1, n2, n3 to represent nodes).

Types

This section is empty.

Jump to

Keyboard shortcuts

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