Documentation
¶
Index ¶
- func ASCII()
- func After()
- func AfterLast()
- func BaseName()
- func Before()
- func BeforeLast()
- func Between()
- func Bind(input string, data interface{}) string
- func Camel()
- func Contains()
- func ContainsAll()
- func DirName()
- func EndsWith()
- func Exactly()
- func Explode()
- func Finish()
- func Is()
- func IsASCII()
- func IsUUID()
- func Kebab()
- func Length(s string) int
- func Limit()
- func Lower()
- func Ltrim()
- func Markdown()
- func Match()
- func MatchAll()
- func OrderedUUID()
- func PadBoth()
- func PadLeft()
- func PadRight()
- func Pipe()
- func Prepend()
- func Random()
- func Remove()
- func Replace(s string, old string, new string, n int) string
- func ReplaceArray()
- func ReplaceFirst()
- func ReplaceLast()
- func ReplaceMatches()
- func Rtrim()
- func Slug()
- func Snake(str string) string
- func Split()
- func Start()
- func StartsWith()
- func Studly()
- func Substr()
- func SubstrCount()
- func Tap()
- func Test()
- func Title()
- func Trim()
- func UUID()
- func Ucfirst()
- func Upper()
- func WordCount()
- func Words()
- type String
- func (s String) ASCII()
- func (s String) After()
- func (s String) AfterLast()
- func (s String) Append()
- func (s String) BaseName()
- func (s String) Before()
- func (s String) BeforeLast()
- func (s String) Between()
- func (s String) Bind(data interface{}) string
- func (s String) Camel()
- func (s String) Contains()
- func (s String) ContainsAll()
- func (s String) DirName()
- func (s String) EndsWith()
- func (s String) Exactly()
- func (s String) Explode()
- func (s String) Finish()
- func (s String) Is()
- func (s String) IsASCII()
- func (s String) IsEmpty()
- func (s String) IsNotEmpty()
- func (s String) IsUUID()
- func (s String) Kebab()
- func (s String) Length() int
- func (s String) Limit()
- func (s String) Lower()
- func (s String) Ltrim()
- func (s String) Markdown()
- func (s *String) MarshalJSON() ([]byte, error)
- func (s String) Match()
- func (s String) MatchAll()
- func (s String) PadBoth()
- func (s String) PadLeft()
- func (s String) PadRight()
- func (s String) Pipe()
- func (s String) Prepend()
- func (s String) Remove()
- func (s String) Replace(old string, new string, n int) string
- func (s String) ReplaceArray()
- func (s String) ReplaceFirst()
- func (s String) ReplaceLast()
- func (s String) ReplaceMatches()
- func (s String) Rtrim()
- func (s *String) Scan(src interface{}) error
- func (s String) Slug()
- func (s String) Snake() string
- func (s String) Split()
- func (s String) Start()
- func (s String) StartsWith()
- func (s String) Studly()
- func (s String) Substr()
- func (s String) Tap()
- func (s String) Test()
- func (s String) Title()
- func (s String) Trim()
- func (s String) Ucfirst()
- func (s *String) UnmarshalJSON(data []byte) error
- func (s String) Upper()
- func (s *String) Value() (driver.Value, error)
- func (s String) When()
- func (s String) WhenEmpty()
- func (s String) WordCount()
- func (s String) Words()
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ASCII ¶
func ASCII()
ASCII The ASCII method will attempt to transliterate the string into an ASCII value
func After ¶
func After()
After The After method returns everything after the given value in a string
func AfterLast ¶
func AfterLast()
AfterLast The AfterLast method returns everything after the last occurrence of the given value in a string
func BaseName ¶
func BaseName()
BaseName The BaseName method will return the trailing name component of the given string
func Before ¶
func Before()
Before The Before method returns everything before the given value in a string
func BeforeLast ¶
func BeforeLast()
BeforeLast The BeforeLast method returns everything before the last occurrence of the given value in a string
func Between ¶
func Between()
Between The Between method returns the portion of a string between two values
func Contains ¶
func Contains()
Contains The Contains method determines if the given string contains the given value. This method is case sensitive
func ContainsAll ¶
func ContainsAll()
ContainsAll The ContainsAll method determines if the given string contains all of the values in a given array
func DirName ¶
func DirName()
DirName The DirName method returns the parent directory portion of the given string
func EndsWith ¶
func EndsWith()
EndsWith The EndsWith method determines if the given string ends with the given value
func Exactly ¶
func Exactly()
Exactly The Exactly method determines if the given string is an exact match with another string
func Explode ¶
func Explode()
Explode The Explode method splits the string by the given delimiter and returns a collection containing each section of the split string:
func Finish ¶
func Finish()
Finish The Finish method adds a single instance of the given value to a string if it does not already end with that value
func Is ¶
func Is()
Is The Is method determines if a given string matches a given pattern. Asterisks may be used as wildcard values
func IsASCII ¶
func IsASCII()
IsASCII The IsASCII method determines if a given string is 7 bit ASCII
func Markdown ¶
func Markdown()
Markdown The Markdown method converts GitHub flavored Markdown into HTML
func Match ¶
func Match()
Match The Match method will return the portion of a string that matches a given regular expression pattern
func MatchAll ¶
func MatchAll()
MatchAll The MatchAll method will return a collection containing the portions of a string that match a given regular expression pattern
func OrderedUUID ¶
func OrderedUUID()
OrderedUUID The OrderedUUID method generates a "timestamp first" UUID that may be efficiently stored in an indexed database column. Each UUID that is generated using this method will be sorted after UUIDs previously generated using the method
func PadBoth ¶
func PadBoth()
PadBoth The PadBoth method padding both sides of a string with another string until the final string reaches a desired length
func PadLeft ¶
func PadLeft()
PadLeft The PadLeft method padding the left side of a string with another string until the final string reaches a desired length
func PadRight ¶
func PadRight()
PadRight The PadRight method padding the right side of a string with another string until the final string reaches a desired length
func Pipe ¶
func Pipe()
Pipe The pipe method allows you to transform the string by passing its current value to the given callable
func Random ¶
func Random()
Random The Random method generates a random string of the specified length.
func Remove ¶
func Remove()
Remove The Remove method removes the given value or array of values from the string:
func ReplaceArray ¶
func ReplaceArray()
ReplaceArray The ReplaceArray method replaces a given value in the string sequentially using an array
func ReplaceFirst ¶
func ReplaceFirst()
ReplaceFirst The ReplaceFirst method replaces the first occurrence of a given value in a string
func ReplaceLast ¶
func ReplaceLast()
ReplaceLast The ReplaceLast method replaces the last occurrence of a given value in a string
func ReplaceMatches ¶
func ReplaceMatches()
ReplaceMatches The replaceMatches method replaces all portions of a string matching a pattern with the given replacement string:
func Split ¶
func Split()
Split The Split method splits a string into a collection using a regular expression
func Start ¶
func Start()
Start The Start method adds a single instance of the given value to a string if it does not already start with that value
func StartsWith ¶
func StartsWith()
StartsWith The StartsWith method determines if the given string begins with the given value
func Substr ¶
func Substr()
Substr The Substr method returns the portion of string specified by the start and length parameters
func SubstrCount ¶
func SubstrCount()
SubstrCount The Str::substrCount method returns the number of occurrences of a given value in the given string
func Tap ¶
func Tap()
Tap The Tap method passes the string to the given closure, allowing you to examine and interact with the string while not affecting the string itself. The original string is returned by the tap method regardless of what is returned by the closure
func Test ¶
func Test()
Test The Test method determines if a string matches the given regular expression pattern
func Ucfirst ¶
func Ucfirst()
Ucfirst The Str::Ucfirst method returns the given string with the first character capitalized
Types ¶
type String ¶
type String string
String type of string
func (String) ASCII ¶
func (s String) ASCII()
ASCII The ASCII method will attempt to transliterate the string into an ASCII value
func (String) After ¶
func (s String) After()
After The After method returns everything after the given value in a string
func (String) AfterLast ¶
func (s String) AfterLast()
AfterLast The AfterLast method returns everything after the last occurrence of the given value in a string
func (String) Append ¶
func (s String) Append()
Append The Append method appends the given values to the string
func (String) BaseName ¶
func (s String) BaseName()
BaseName The BaseName method will return the trailing name component of the given string
func (String) Before ¶
func (s String) Before()
Before The Before method returns everything before the given value in a string
func (String) BeforeLast ¶
func (s String) BeforeLast()
BeforeLast The BeforeLast method returns everything before the last occurrence of the given value in a string
func (String) Between ¶
func (s String) Between()
Between The Between method returns the portion of a string between two values
func (String) Camel ¶
func (s String) Camel()
Camel The Camel method converts the given string to camelCase
func (String) Contains ¶
func (s String) Contains()
Contains The Contains method determines if the given string contains the given value. This method is case sensitive
func (String) ContainsAll ¶
func (s String) ContainsAll()
ContainsAll The ContainsAll method determines if the given string contains all of the values in a given array
func (String) DirName ¶
func (s String) DirName()
DirName The DirName method returns the parent directory portion of the given string
func (String) EndsWith ¶
func (s String) EndsWith()
EndsWith The EndsWith method determines if the given string ends with the given value
func (String) Exactly ¶
func (s String) Exactly()
Exactly The Exactly method determines if the given string is an exact match with another string
func (String) Explode ¶
func (s String) Explode()
Explode The Explode method splits the string by the given delimiter and returns a collection containing each section of the split string:
func (String) Finish ¶
func (s String) Finish()
Finish The Finish method adds a single instance of the given value to a string if it does not already end with that value
func (String) Is ¶
func (s String) Is()
Is The Is method determines if a given string matches a given pattern. Asterisks may be used as wildcard values
func (String) IsASCII ¶
func (s String) IsASCII()
IsASCII The IsASCII method determines if a given string is 7 bit ASCII
func (String) IsEmpty ¶
func (s String) IsEmpty()
IsEmpty The isEmpty method determines if the given string is empty
func (String) IsNotEmpty ¶
func (s String) IsNotEmpty()
IsNotEmpty The IsNotEmpty method determines if the given string is not empty
func (String) IsUUID ¶
func (s String) IsUUID()
IsUUID The IsUUID method determines if the given string is a valid UUID
func (String) Kebab ¶
func (s String) Kebab()
Kebab The Kebab method converts the given string to kebab-case
func (String) Limit ¶
func (s String) Limit()
Limit The limit method truncates the given string to the specified length
func (String) Lower ¶
func (s String) Lower()
Lower The Lower method converts the given string to lowercase
func (String) Ltrim ¶
func (s String) Ltrim()
Ltrim The Ltrim method trims the left side of the string
func (String) Markdown ¶
func (s String) Markdown()
Markdown The Markdown method converts GitHub flavored Markdown into HTML
func (*String) MarshalJSON ¶
MarshalJSON for json MarshalJSON
func (String) Match ¶
func (s String) Match()
Match The Match method will return the portion of a string that matches a given regular expression pattern
func (String) MatchAll ¶
func (s String) MatchAll()
MatchAll The MatchAll method will return a collection containing the portions of a string that match a given regular expression pattern
func (String) PadBoth ¶
func (s String) PadBoth()
PadBoth The PadBoth method padding both sides of a string with another string until the final string reaches a desired length
func (String) PadLeft ¶
func (s String) PadLeft()
PadLeft The PadLeft method padding the left side of a string with another string until the final string reaches a desired length
func (String) PadRight ¶
func (s String) PadRight()
PadRight The PadRight method padding the right side of a string with another string until the final string reaches a desired length
func (String) Pipe ¶
func (s String) Pipe()
Pipe The pipe method allows you to transform the string by passing its current value to the given callable
func (String) Prepend ¶
func (s String) Prepend()
Prepend The Prepend method prepends the given values onto the string
func (String) Remove ¶
func (s String) Remove()
Remove The Remove method removes the given value or array of values from the string:
func (String) ReplaceArray ¶
func (s String) ReplaceArray()
ReplaceArray The ReplaceArray method replaces a given value in the string sequentially using an array
func (String) ReplaceFirst ¶
func (s String) ReplaceFirst()
ReplaceFirst The ReplaceFirst method replaces the first occurrence of a given value in a string
func (String) ReplaceLast ¶
func (s String) ReplaceLast()
ReplaceLast The ReplaceLast method replaces the last occurrence of a given value in a string
func (String) ReplaceMatches ¶
func (s String) ReplaceMatches()
ReplaceMatches The replaceMatches method replaces all portions of a string matching a pattern with the given replacement string:
func (String) Rtrim ¶
func (s String) Rtrim()
Rtrim The Rtrim method trims the right side of the given string
func (String) Slug ¶
func (s String) Slug()
Slug The Slug method generates a URL friendly "slug" from the given string
func (String) Split ¶
func (s String) Split()
Split The Split method splits a string into a collection using a regular expression
func (String) Start ¶
func (s String) Start()
Start The Start method adds a single instance of the given value to a string if it does not already start with that value
func (String) StartsWith ¶
func (s String) StartsWith()
StartsWith The StartsWith method determines if the given string begins with the given value
func (String) Studly ¶
func (s String) Studly()
Studly The Studly method converts the given string to StudlyCase
func (String) Substr ¶
func (s String) Substr()
Substr The Substr method returns the portion of string specified by the start and length parameters
func (String) Tap ¶
func (s String) Tap()
Tap The Tap method passes the string to the given closure, allowing you to examine and interact with the string while not affecting the string itself. The original string is returned by the tap method regardless of what is returned by the closure
func (String) Test ¶
func (s String) Test()
Test The Test method determines if a string matches the given regular expression pattern
func (String) Title ¶
func (s String) Title()
Title The Title method converts the given string to Title Case
func (String) Ucfirst ¶
func (s String) Ucfirst()
Ucfirst The Str::Ucfirst method returns the given string with the first character capitalized
func (*String) UnmarshalJSON ¶
UnmarshalJSON for json UnmarshalJSON
func (String) Upper ¶
func (s String) Upper()
Upper The Upper method converts the given string to uppercase
func (String) When ¶
func (s String) When()
When The When method invokes the given closure if a given condition is true. The closure will receive the fluent string instance
func (String) WhenEmpty ¶
func (s String) WhenEmpty()
WhenEmpty The WhenEmpty method invokes the given closure if the string is empty. If the closure returns a value, that value will also be returned by the whenEmpty method. If the closure does not return a value, the fluent string instance will be returned