import "github.com/jimsnab/go-simpleutils"- func CharGet(input string, position int) rune
- func CopyFile(srcPath, destPath string) (int64, error)
- func DeepCopy(src interface{}) (dest interface{})
- func Escape(s string) string
- func FileExists(path string) (bool, error)
- func GenerateRandomBytes(count int) ([]byte, error)
- func GenerateRandomString(count int) (string, error)
- func IndexAt(testString, substring string, startingIndex int) int
- func IndexAtAny(testString, chars string, startingIndex int) int
- func IsDirectory(path string) (bool, error)
- func IsTokenCharFirst(ch rune) bool
- func IsTokenCharNext(ch rune) bool
- func IsTokenName(s string) bool
- func IsTokenNameWithMiddleChars(s string, middleChars string) bool
- func PatternMatch(pattern string, testString string) bool
- func PrintableStr(input string) string
- func RuneIndexAt(testString, substring []rune, startingIndex int) int
- func RuneIndexAtAny(testString, chars []rune, startingIndex int) int
- func SortedKeys(m interface{}) []string
- func StringArrayToString(strs []string, delimiter string) string
- func Substr(input string, start int, length int) string
- func Utf8len(data []byte, offset int) int
- func WhichSuffix(s string, suffixes ...string) *string
- type HashedText
func CharGet
func CharGet(input string, position int) runeCharget returns the rune at the logical index position
func CopyFile
func CopyFile(srcPath, destPath string) (int64, error)CopyFile reads file content into memory and writes it to a new file
func DeepCopy
func DeepCopy(src interface{}) (dest interface{})DeepCopy generates a separate copy of a source object
func Escape
func Escape(s string) stringEscape translates control characters to backslash escape sequence; e.g., '\r' becomes `\r`
func FileExists
func FileExists(path string) (bool, error)FileExists returns true if path corresponds to a file, and false if it corresponds to nothing or to a directory.
func GenerateRandomBytes
func GenerateRandomBytes(count int) ([]byte, error)GenerateRandomBytes returns a byte array of cryptographic (true) random numbers. The byte array length is specified by count.
func GenerateRandomString
func GenerateRandomString(count int) (string, error)GenerateRandomString returns a base-64 encoding of a cryptographic (true) random number byte array. The byte array length is specified by count.
func IndexAt
func IndexAt(testString, substring string, startingIndex int) intIndexAt is like strings.Index with a starting index
func IndexAtAny
func IndexAtAny(testString, chars string, startingIndex int) intIndexAtAny is like strings.Index with a starting index
func IsDirectory
func IsDirectory(path string) (bool, error)IsDirectory returns true if path corresponds to a directory, and false if it corresponds to nothing or to a file.
func IsTokenCharFirst
func IsTokenCharFirst(ch rune) boolIsTokenCharFirst returns true if ch is a letter or underscore
func IsTokenCharNext
func IsTokenCharNext(ch rune) boolIsTokenCharNext returns true if ch is a letter, number or underscore
func IsTokenName
func IsTokenName(s string) boolIsTokenName returns true if s contains only letters, numbers or underscores, and does not start with a number, and has at least one letter
func IsTokenNameWithMiddleChars(s string, middleChars string) boolIsTokenNameWithMiddleChars returns true if s contains only letters, numbers or underscores, or has allowed characters that are not first or last, does not start with a number, and has at least one letter. A common middleChars string is "-".
func PatternMatch
func PatternMatch(pattern string, testString string) boolPatternMatch performs a simple asterisk-based pattern match
func PrintableStr
func PrintableStr(input string) stringPrintableStr converts non-printable characters in input to a dot
func RuneIndexAt
func RuneIndexAt(testString, substring []rune, startingIndex int) intRuneIndexAt is a version of IndexAt for rune arrays
func RuneIndexAtAny
func RuneIndexAtAny(testString, chars []rune, startingIndex int) intRuneIndexAtAny is a version of IndexAtAny for rune arrays
func SortedKeys
func SortedKeys(m interface{}) []stringSortedKeys returns the key array for the map, sorted A-Z
func StringArrayToString
func StringArrayToString(strs []string, delimiter string) stringStringArrayToStrings converts an array of strings to a single string, placing the delimiter string between each
func Substr
func Substr(input string, start int, length int) stringSubstr returns a string based on logical character start and length, instead of bytes like a slice
func Utf8len
func Utf8len(data []byte, offset int) intUtf8len returns the number of bytes in the logical UTF-8 character, 0 if the character is incomplete, or -1 if the character is invalid,
func WhichSuffix
func WhichSuffix(s string, suffixes ...string) *stringWhichSuffix returns a pointer to the first suffix matching s, or nil if none of the suffixes match
type HashedText
HashedText is a typed alias for string
type HashedText stringfunc HashText
func HashText(text string) HashedTextHashText returns a sha1 hash of text in base64 encoding.
Generated by gomarkdoc