stringext

package module
v1.0.1 Latest Latest
Warning

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

Go to latest
Published: Apr 3, 2022 License: MIT Imports: 3 Imported by: 3

README

String Ext helper

Go String helper functions

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Convert

func Convert(s []string, c stringConverter) []string

Convert a list of string using the passed stringConverter function

func EqualFold

func EqualFold(s, t string) bool

EqualFold is strings.EqualFold, ASCII only.

func IsAscii

func IsAscii(s string) bool

IsAscii returns whether string is ASCII.

func JoinPaths

func JoinPaths(absolutePath, relativePath string) string

func Lower

func Lower(b byte) byte

Lower converts to lowercase.

func Printable

func Printable(s string) bool

Printable returns whether s is ASCII and printable according to https://tools.ietf.org/html/rfc20#section-4.2.

func Split

func Split(str, sep string) (string, string)

Split a string in two parts, cleaning any whitespace.

func ToLower

func ToLower(s string) (lower string, ok bool)

ToLower returns the lowercase.

func Tokenize

func Tokenize(source string) []string

Tokenize and unique a string

func Unique

func Unique(values []string, converter func(string) string) []string

func UniqueNoConversion

func UniqueNoConversion(values []string) []string

func Upper

func Upper(b byte) byte

Upper converts to uppercase.

func Vectorize

func Vectorize(content, splitBy string, c stringConverter) []string

Types

This section is empty.

Jump to

Keyboard shortcuts

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