Documentation ¶
Overview ¶
Package strings defines strings helpers.
Index ¶
- func CaesarDecrypt(input string, shift int) string
- func CaesarEncrypt(input string, shift int) string
- func IsValidEmail(email string) bool
- func Rot13Decode(input string) string
- func Rot13Encode(input string) string
- func SanitizeEmail(email string) string
- func SubstringSearch(input, substring string, options SubstringSearchOptions) []string
- func Title(input string) string
- func ToTitle(input string, exceptions []string) string
- func Tokenize(input string, customDelimiters string) []string
- type SubstringSearchOptions
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CaesarDecrypt ¶
CaesarDecrypt decrypts a string encrypted with the Caesar cipher and a given shift.
func CaesarEncrypt ¶
CaesarEncrypt encrypts a string using the Caesar cipher with a given shift.
func IsValidEmail ¶
IsValidEmail checks if a given string is a valid email address.
func Rot13Decode ¶
Rot13Decode decodes a string encoded with the ROT13 cipher.
func Rot13Encode ¶
Rot13Encode encodes a string using the ROT13 cipher.
func SanitizeEmail ¶
SanitizeEmail removes leading and trailing whitespace from an email address.
func SubstringSearch ¶
func SubstringSearch(input, substring string, options SubstringSearchOptions) []string
SubstringSearch performs substring search in a string and optionally returns indexes.
Types ¶
type SubstringSearchOptions ¶
type SubstringSearchOptions struct { CaseInsensitive bool // Perform case-insensitive search ReturnIndexes bool // Return the starting indexes of found substrings }
SubstringSearchOptions contains options for substring search.
Click to show internal directories.
Click to hide internal directories.