MCPcopy Create free account

hub / github.com/gobeam/stringy / functions

Functions101 in github.com/gobeam/stringy

↓ 62 callersFunctionNew
New func returns pointer to input struct
stringy.go:54
↓ 27 callersFunctiongetInput
(i input)
helper.go:37
↓ 16 callersMethodToLower
()
stringy.go:46
↓ 11 callersMethodGet
()
stringy.go:31
↓ 10 callersMethodPad
(length int, with, padType string)
stringy.go:36
↓ 9 callersMethodToUpper
()
stringy.go:47
↓ 5 callersMethodCamelCase
(rule ...string)
stringy.go:27
↓ 5 callersMethodSnakeCase
(rule ...string)
stringy.go:43
↓ 5 callersFunctioncaseHelper
(input string, isCamel bool, rule ...string)
helper.go:12
↓ 4 callersMethodBetween
(start, end string)
stringy.go:24
↓ 4 callersMethodBoolean
()
stringy.go:25
↓ 3 callersMethodContainsAll
(check ...string)
stringy.go:28
↓ 3 callersMethodDelimited
(delimiter string, rule ...string)
stringy.go:29
↓ 3 callersMethodFirst
(length int)
stringy.go:30
↓ 3 callersMethodLast
(length int)
stringy.go:33
↓ 3 callersMethodPrefix
(with string)
stringy.go:49
↓ 3 callersMethodReplaceFirst
(search, replace string)
stringy.go:38
↓ 3 callersMethodShuffle
()
stringy.go:41
↓ 3 callersMethodSuffix
(with string)
stringy.go:50
↓ 3 callersMethodTease
(length int, indicator string)
stringy.go:44
↓ 3 callersFunctionucfirst
(val string)
helper.go:62
↓ 2 callersMethodAcronym
()
stringy.go:23
↓ 2 callersMethodKebabCase
(rule ...string)
stringy.go:32
↓ 2 callersMethodLines
()
stringy.go:35
↓ 2 callersMethodPascalCase
(rule ...string)
stringy.go:26
↓ 2 callersMethodRemoveSpecialCharacter
()
stringy.go:37
↓ 2 callersMethodReplaceLast
(search, replace string)
stringy.go:39
↓ 2 callersMethodReverse
()
stringy.go:40
↓ 2 callersMethodSurround
(with string)
stringy.go:42
↓ 2 callersMethodTitle
()
stringy.go:45
↓ 2 callersFunctioncontains
(slice []string, item string)
helper.go:28
↓ 2 callersFunctionreplaceStr
(input, search, replace, types string)
helper.go:46
↓ 1 callersMethodLcFirst
()
stringy.go:34
↓ 1 callersMethodUcFirst
()
stringy.go:48
MethodAcronym
Acronym func returns acronym of input string. You can chain to upper which with make result all upercase or ToLower which will make result all lower c
stringy.go:61
MethodBetween
Between takes two string params start and end which and returns value which is in middle of start and end part of input. You can chain to upper which
stringy.go:76
MethodBoolean
Boolean func returns boolean value of string value like on, off, 0, 1, yes, no returns boolean value of string input. You can chain this function on o
stringy.go:101
MethodCamelCase
CamelCase is variadic function which takes one Param rule i.e slice of strings and it returns input type string in camel case form and rule helps to o
stringy.go:122
MethodContainsAll
ContainsAll is variadic function which takes slice of strings as param and checks if they are present in input and returns boolean value accordingly
stringy.go:156
MethodDelimited
Delimited is variadic function that takes two params delimiter and slice of strings i.e rule. It joins the string by passed delimeter. Rule param help
stringy.go:170
MethodFirst
First returns first n characters from provided input. It removes all spaces in string before doing so.
stringy.go:181
MethodGet
Get simply returns result and can be chained on function which returns StringManipulation interface
stringy.go:192
MethodKebabCase
KebabCase is variadic function that takes one Param slice of strings named rule and it returns passed string in kebab case form. Rule param helps to o
stringy.go:202
MethodLast
Last returns last n characters from provided input. It removes all spaces in string before doing so.
stringy.go:210
MethodLcFirst
LcFirst simply returns result by lower casing first letter of string and it can be chained on function which return StringManipulation interface
stringy.go:223
MethodLines
Lines returns slice of strings by removing white space characters
stringy.go:232
MethodPad
Pad takes three param length i.e total length to be after padding, with i.e what to pad with and pad type which can be ("both" or "left" or "right")
stringy.go:242
MethodPascalCase
PascalCase is variadic function which takes one Param rule i.e slice of strings and it returns input type string in camel case form and rule helps to
stringy.go:143
MethodPrefix
Prefix makes sure that string is prefixed with a given string
stringy.go:388
MethodRemoveSpecialCharacter
RemoveSpecialCharacter removes all special characters and returns the string it can be chained on function which return StringManipulation interface
stringy.go:269
MethodReplaceFirst
ReplaceFirst takes two param search and replace. It returns string by searching search sub string and replacing it with replace substring on first occ
stringy.go:287
MethodReplaceLast
ReplaceLast takes two param search and replace it return string by searching search sub string and replacing it with replace substring on last occurre
stringy.go:296
MethodReverse
Reverse reverses the passed strings it can be chained on function which return StringManipulation interface
stringy.go:303
MethodShuffle
Shuffle shuffles the given string randomly it can be chained on function which return StringManipulation interface
stringy.go:314
MethodSnakeCase
SnakeCase is variadic function that takes one Param slice of strings named rule and it returns passed string in snake case form. Rule param helps to o
stringy.go:330
MethodSuffix
Suffix makes sure that string is suffixed with a given string
stringy.go:398
MethodSurround
Surround takes one param with which is used to surround user input and it can be chained on function which return StringManipulation interface.
stringy.go:339
MethodTease
Tease takes two params length and indicator and it shortens given string on passed length and adds indicator on end it can be chained on function whic
stringy.go:347
FunctionTestInput_Acronym
(t *testing.T)
stringy_test.go:9
FunctionTestInput_Between
(t *testing.T)
stringy_test.go:17
FunctionTestInput_BooleanError
(t *testing.T)
stringy_test.go:62
FunctionTestInput_BooleanFalse
(t *testing.T)
stringy_test.go:51
FunctionTestInput_BooleanTrue
(t *testing.T)
stringy_test.go:40
FunctionTestInput_CamelCase
(t *testing.T)
stringy_test.go:78
FunctionTestInput_CamelCaseNoRule
(t *testing.T)
stringy_test.go:86
FunctionTestInput_CamelCaseOddRuleError
(t *testing.T)
stringy_test.go:94
FunctionTestInput_ContainsAll
(t *testing.T)
stringy_test.go:128
FunctionTestInput_Delimited
(t *testing.T)
stringy_test.go:138
FunctionTestInput_DelimitedNoDelimeter
(t *testing.T)
stringy_test.go:146
FunctionTestInput_EmptyBetween
(t *testing.T)
stringy_test.go:24
FunctionTestInput_EmptyNoMatchBetween
(t *testing.T)
stringy_test.go:32
FunctionTestInput_First
(t *testing.T)
stringy_test.go:355
FunctionTestInput_FirstError
(t *testing.T)
stringy_test.go:363
FunctionTestInput_KebabCase
(t *testing.T)
stringy_test.go:154
FunctionTestInput_Last
(t *testing.T)
stringy_test.go:383
FunctionTestInput_LastError
(t *testing.T)
stringy_test.go:373
FunctionTestInput_LcFirst
(t *testing.T)
stringy_test.go:162
FunctionTestInput_Lines
(t *testing.T)
stringy_test.go:194
FunctionTestInput_Pad
(t *testing.T)
stringy_test.go:205
FunctionTestInput_PadInvalidLength
(t *testing.T)
stringy_test.go:218
FunctionTestInput_PascalCaseNoRule
(t *testing.T)
stringy_test.go:107
FunctionTestInput_PascalCaseOddRuleError
(t *testing.T)
stringy_test.go:115
FunctionTestInput_Prefix
(t *testing.T)
stringy_test.go:391
FunctionTestInput_RemoveSpecialCharacter
(t *testing.T)
stringy_test.go:235
FunctionTestInput_ReplaceFirst
(t *testing.T)
stringy_test.go:243
FunctionTestInput_ReplaceFirstEmptyInput
(t *testing.T)
stringy_test.go:251
FunctionTestInput_ReplaceLast
(t *testing.T)
stringy_test.go:259
FunctionTestInput_Reverse
(t *testing.T)
stringy_test.go:267
FunctionTestInput_Shuffle
(t *testing.T)
stringy_test.go:275
FunctionTestInput_SnakeCase
(t *testing.T)
stringy_test.go:283
FunctionTestInput_Suffix
(t *testing.T)
stringy_test.go:405
FunctionTestInput_Surround
(t *testing.T)
stringy_test.go:291
FunctionTestInput_Tease
(t *testing.T)
stringy_test.go:299
FunctionTestInput_TeaseEmpty
(t *testing.T)
stringy_test.go:307
FunctionTestInput_Title
(t *testing.T)
stringy_test.go:315
FunctionTestInput_UcFirst
(t *testing.T)
stringy_test.go:323
MethodTitle
Title makes first letter of each word of user input to uppercase it can be chained on function which return StringManipulation interface
stringy.go:364
MethodToLower
ToLower makes all string of user input to lowercase it can be chained on function which return StringManipulation interface
stringy.go:357
MethodToUpper
ToUpper makes all string of user input to uppercase it can be chained on function which return StringManipulation interface
stringy.go:375
MethodUcFirst
UcFirst makes first word of user input to uppercase it can be chained on function which return StringManipulation interface
stringy.go:382
next →1–100 of 101, ranked by callers