strhelp

package
v0.40.4 Latest Latest
Warning

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

Go to latest
Published: May 19, 2022 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CommaIfy

func CommaIfy(n int64) string

func NthToken

func NthToken(s string, delim rune, n int) (string, bool)

NthToken returns the Nth token in s, delimited by delim. There is always at least one token: the zeroth token is the input string if delim doesn't occur in s. The second return value will be false if there is no Nth token.

Types

type LineStrBuilder

type LineStrBuilder []string

LineStrBuilder is a utility class for building strings line by line

func (LineStrBuilder) AppendLine

func (lsb LineStrBuilder) AppendLine(strFmt string, args ...interface{}) LineStrBuilder

AppendLine works like append in that it returns an instance of a LineStrBuilder with the contents updated to contain the additional line. lsb = lsb.AppendLine("n: %d, s: %s", n, s)

func (LineStrBuilder) String

func (lsb LineStrBuilder) String() string

String returns the built string with all lines separated by newlines

Jump to

Keyboard shortcuts

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