Documentation ¶
Overview ¶
Package stringz contains a set of utilities to deal with strings
Index ¶
- func AddURLDefaultPort(rawURL string) string
- func Base64(bin []byte) string
- func FaviconHash(data []byte) (int32, error)
- func GetInvalidURI(rawURL string) (bool, string)
- func InsertInto(s string, interval int, sep rune) string
- func RemoveURLDefaultPort(rawURL string) string
- func SplitByCharAndTrimSpace(s, splitchar string) (result []string)
- func StringToSliceInt(s string) ([]int, error)
- func StringToSliceUInt32(s string) ([]uint32, error)
- func TrimProtocol(targetURL string, addDefaultPort bool) string
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AddURLDefaultPort ¶
AddURLDefaultPort add url default port (80/443) from an URI eg: http://foo.com -> http://foo.com:80 https://foo.com -> https://foo.com:443
func FaviconHash ¶
func GetInvalidURI ¶
func RemoveURLDefaultPort ¶
RemoveURLDefaultPort remove url default port (80/443) from an URI eg: http://foo.com:80 -> http://foo.com https://foo.com:443 -> https://foo.com
func SplitByCharAndTrimSpace ¶
SplitByCharAndTrimSpace splits string by a character and remove spaces
func StringToSliceInt ¶
StringToSliceInt converts string to slice of ints
func StringToSliceUInt32 ¶
StringToSliceUInt converts string to slice of ints
func TrimProtocol ¶
TrimProtocol removes the HTTP scheme from an URI
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.