stringutils

package
Version: v1.10.3-ros1 Latest Latest
Warning

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

Go to latest
Published: Mar 18, 2016 License: Apache-2.0 Imports: 4 Imported by: 0

README

This package provides helper functions for dealing with strings

Documentation

Overview

Package stringutils provides helper functions for dealing with strings.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GenerateRandomASCIIString

func GenerateRandomASCIIString(n int) string

GenerateRandomASCIIString generates an ASCII random stirng with length n.

func GenerateRandomAlphaOnlyString

func GenerateRandomAlphaOnlyString(n int) string

GenerateRandomAlphaOnlyString generates an alphabetical random string with length n.

func InSlice

func InSlice(slice []string, s string) bool

InSlice tests whether a string is contained in a slice of strings or not. Comparison is case insensitive

func ShellQuoteArguments

func ShellQuoteArguments(args []string) string

ShellQuoteArguments takes a list of strings and escapes them so they will be handled right when passed as arguments to an program via a shell

func Truncate

func Truncate(s string, maxlen int) string

Truncate truncates a string to maxlen.

Types

This section is empty.

Source Files

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
t or T : Toggle theme light dark auto
y or Y : Canonical URL