Documentation ¶
Index ¶
- Variables
- func CheckPalindrome(str string) bool
- func CheckPresence(array []string, target string) bool
- func ContainsLetter(str string) bool
- func ContainsMultiple(lower bool, s string, substring ...string) bool
- func ContainsOnlyLetter(str string) bool
- func CountLines(str string) int
- func CreateJSON(values []string) string
- func DiceCoefficient(string1, string2 string) float64
- func ExtractString(data *string, first, last string) string
- func ExtractTextFromQuery(target string, ignore []string) []string
- func GetFirstRune(data string) rune
- func HasPrefixArray(prefixs []string, target string) bool
- func IsASCII(s string) bool
- func IsASCIIRune(r rune) bool
- func IsBlank(str string) bool
- func IsLower(str string) bool
- func IsUpper(str string) bool
- func JaroDistance(str1, str2 string) float64
- func Join(strs ...string) string
- func JoinSeparator(sep string, strs ...string) string
- func LevenshteinDistance(str1, str2 string) int
- func LevenshteinDistanceLegacy(str1, str2 string) int
- func RandomString(n int) string
- func RemoveDoubleWhiteSpace(str string) string
- func RemoveFromString(data string, i int) string
- func RemoveNonASCII(str string) string
- func RemoveWhiteSpace(str string) string
- func ReplaceAtIndex(str, replacement string, index int) string
- func ReverseString(str string) string
- func Split(data string) []string
- func Trim(str string) string
- func Unique(data []string) []string
Constants ¶
This section is empty.
Variables ¶
var BOM = []byte{0xef, 0xbb, 0xbf} // UTF-8
Functions ¶
func CheckPalindrome ¶ added in v0.0.19
CheckPalindrome is delegated to verify if the given string is palindrome
func CheckPresence ¶
CheckPresence verify that the given array contains the target string
func ContainsLetter ¶
ContainsLetter verity that the given string contains, at least, an ASCII alphabet characters Note: whitespace is allowed
func ContainsMultiple ¶ added in v0.0.28
ContainsMultiple is delegated to verify if the given string 's' contains all the 'substring' present
func ContainsOnlyLetter ¶ added in v0.0.12
ContainsOnlyLetter verity that the given string contains, only, ASCII alphabet characters Note, whitespace is allowed
func CountLines ¶
CountLines return the number of lines in the given string
func CreateJSON ¶
CreateJSON is delegated to create a simple json object for the key pair in input
func DiceCoefficient ¶ added in v0.0.22
DiceCoefficient is bigram position dependent implementation of the Dice coefficient
func ExtractString ¶
ExtractString is delegated to filter the content of the given data delimited by 'first' and 'last' string
func ExtractTextFromQuery ¶
ExtractTextFromQuery is delegated to retrieve the list of word involved in the query. It can be viewed as a tokenzier that use whitespace for delimit the word
func GetFirstRune ¶ added in v0.0.41
func HasPrefixArray ¶ added in v0.0.51
func IsASCIIRune ¶ added in v0.0.4
IsASCIIRune is delegated to verify if the given character is ASCII compliant
func IsBlank ¶ added in v0.0.6
IsBlank is delegated to verify that the does not contains only empty char
func JaroDistance ¶ added in v0.0.22
JaroDistance is delegated to calculate the Jaro distance from the two given string
func JoinSeparator ¶ added in v0.0.28
Join is a quite efficient string concatenator
func LevenshteinDistance ¶ added in v0.0.22
LevenshteinDistance is an optimized version for calculate the levenstein distance
func LevenshteinDistanceLegacy ¶ added in v0.0.22
LevenshteinDistanceLegacy is delegated to calculate the Levenshtein distance for the given string
func RandomString ¶ added in v0.0.6
RandomString is delegated to create a random string with whitespace included as fast as possible
func RemoveDoubleWhiteSpace ¶ added in v0.0.19
RemoveDoubleWhiteSpace is delegated to remove the whitespace from the given string FIXME: memory inefficient, use 2n size, use RemoveFromString method instead
func RemoveFromString ¶
RemoveFromString Remove a given character in position i from the input string
func RemoveNonASCII ¶ added in v0.0.5
RemoveNonASCII is delegated to clean the text from the NON ASCII character
func RemoveWhiteSpace ¶ added in v0.0.19
RemoveWhiteSpace is delegated to remove the whitespace from the given string FIXME: memory inefficient, use 2n size, use RemoveFromString method instead
func ReplaceAtIndex ¶ added in v0.0.3
ReplaceAtIndex is delegated to replace the character related to the index with the input rune
func ReverseString ¶ added in v0.0.19
ReverseString is delegated to return the reverse of the input string
Types ¶
This section is empty.