strutil

package
v0.0.0-...-f8a693f Latest Latest
Warning

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

Go to latest
Published: Oct 25, 2016 License: MIT Imports: 3 Imported by: 0

Documentation

Overview

Package strutil provides various utilities for manipulating strings

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Join

func Join(list []string, delim string) string

Join joins the list of the string with the delim provided

func PadLeft

func PadLeft(str string, length int, pad byte) string

PadLeft returns a new string of a specified length in which the beginning of the current string is padded with spaces or with a specified Unicode character.

func PadRight

func PadRight(str string, length int, pad byte) string

PadRight returns a new string of a specified length in which the end of the current string is padded with spaces or with a specified Unicode character.

func Resize

func Resize(s string, length uint, rightAlign bool) string

Resize resizes the string with the given length. It ellipses with '...' when the string's length exceeds the desired length or pads spaces to the right of the string when length is smaller than desired

Types

This section is empty.

Jump to

Keyboard shortcuts

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