str

package
v0.1.4 Latest Latest
Warning

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

Go to latest
Published: Nov 26, 2023 License: MIT Imports: 3 Imported by: 2

Documentation

Overview

Copyright 2023 Christopher Briscoe. All rights reserved.

Copyright 2023 Christopher Briscoe. All rights reserved.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func IsBackslash

func IsBackslash(r rune) bool

IsBackslash returns true if the rune is an ASCII backslash [\].

func IsDigit

func IsDigit(r rune) bool

IsDigit returns true if the rune is an ASCII numerical digit [0-9].

func IsLower

func IsLower(r rune) bool

IsLower returns true if the rune is an ASCII lower case character [a-z].

func IsQuote

func IsQuote(r rune) bool

IsQuote returns true if the rune is an ASCII quote character ["'`].

func IsReadable

func IsReadable(r rune) bool

IsReadable returns true if the rune is an ASCII readable character.

func IsSpace

func IsSpace(r rune) bool

IsSpace returns true if the rune is an ASCII space [ ].

func IsSpecial

func IsSpecial(r rune) bool

IsSpecial returns true if the rune is an ASCII special character and not one of the 3 quote characters or backslash. [!#$%&()*+,-./:;<=>?@^_{|}~] and not ["'`\]

func IsUpper

func IsUpper(r rune) bool

IsUpper returns true if the rune is an ASCII upper case character [A-Z].

func SortAndRemoveDuplicates

func SortAndRemoveDuplicates(s []string) []string

SortAndRemoveDuplicates will sort the string slice while removing duplicates.

func ToASCII

func ToASCII(s string) string

ToASCII will return a string that is stripped of non ASCII readable characters.

func TrimQuotes

func TrimQuotes(s string) string

TrimQuotes removes quotes from the beginning and end of a string.

func UnsafeByteToString

func UnsafeByteToString(b []byte) string

UnsafeByteToString converts a byte to a string without memory allocations. They will both share the same bytes, so make sure not to modify the bytes while the string still survives.

func UnsafeStringToByte

func UnsafeStringToByte(s string) (b []byte)

UnsafeStringToByte converts a string to a byte without memory allocations. They will both share the same bytes, so make sure not to modify the bytes while the string still survives.

Types

This section is empty.

Jump to

Keyboard shortcuts

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