stringutils

package
v0.0.5 Latest Latest
Warning

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

Go to latest
Published: Oct 22, 2019 License: MIT Imports: 4 Imported by: 11

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CheckPresence

func CheckPresence(target string, array []string) bool

CheckPresence verify that the given array contains the target string

func ContainsLetter

func ContainsLetter(str string) bool

ContainsLetter verity that the given string contains, at least, an ASCII character

func CountLinesString added in v0.0.5

func CountLinesString(fileContet string) int

CountLinesString return the number of lines in the given string

func CreateJSON

func CreateJSON(values ...string) string

CreateJSON is delegated to create a json object for the key pair in input

func ExtractString

func ExtractString(data *string, first, last string) string

ExtractString is delegated to filter the content of the given data delimited by 'first' and 'last' string

func ExtractTextFromQuery

func ExtractTextFromQuery(target string, ignore []string) []string

ExtractTextFromQuery is delegated to retrieve the list of string involved in the query

func IsASCII

func IsASCII(s string) bool

IsASCII is delegated to verify if a given string is ASCII compliant

func IsASCIIRune added in v0.0.4

func IsASCIIRune(r rune) bool

IsASCIIRune is delegated to verify if the given character is ASCII compliant

func IsLower added in v0.0.2

func IsLower(str string) bool

IsLower verify that a string does contains only lower char

func IsUpper

func IsUpper(str string) bool

IsUpper verify that a string does contains only upper char

func Join

func Join(strs ...string) string

Join is a quite efficient string concatenator

func RemoveFromString

func RemoveFromString(data string, i int) string

RemoveFromString Remove a given element from a string

func RemoveNonASCII added in v0.0.5

func RemoveNonASCII(str string) string

RemoveNonASCII is delegated to clean the text from the NON ASCII character

func RemoveWhiteSpaceString

func RemoveWhiteSpaceString(str string) string

RemoveWhiteSpaceString is delegated to remove the whitespace from the given string FIXME: unefficient, use 2n size, use RemoveFromString method instead

func ReplaceAtIndex added in v0.0.3

func ReplaceAtIndex(str string, replacement rune, index int) string

ReplaceAtIndex is delegated to replace the character related to the index with the input rune

func Split

func Split(data string) []string

Split is delegated to split the string by the new line

Types

This section is empty.

Jump to

Keyboard shortcuts

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