strings2

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Oct 29, 2018 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Chars

func Chars(s string) []string

Chars returns all characters a string slice.

func Chop

func Chop(s string, l int) []string

Chop chops the string with the given length and returns a string slice.

func Insert

func Insert(s string, i int, a string) string

Insert inserts a new string at a given index and returns the string.

func Lines

func Lines(s string) []string

Lines returns the lines in the string as a string slice.

func Reverse

func Reverse(s string) string

Reverse returns the string reversed.

func Slug

func Slug(s string) string

Slug generates a slug from a input string.

func SwapCase

func SwapCase(s string) string

SwapCase returns a string where uppercase is swapped with lowercase and lowercase to uppercase and vice versa.

func Truncate

func Truncate(s string, w int, args ...interface{}) string

Truncate will truncate the string and add dots or given character at the end. The additional values are length of the dots or given character and the character that should be used.

Types

This section is empty.

Jump to

Keyboard shortcuts

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