https://github.com/nitesh-/stringtil
A small string utils library which contains PHP inbuilt functions written in Go.
https://github.com/nitesh-/stringtil
golang library string-manipulation
Last synced: 6 months ago
JSON representation
A small string utils library which contains PHP inbuilt functions written in Go.
- Host: GitHub
- URL: https://github.com/nitesh-/stringtil
- Owner: nitesh-
- License: mit
- Created: 2020-01-03T06:30:08.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2020-06-04T07:14:41.000Z (about 6 years ago)
- Last Synced: 2024-06-19T04:30:15.646Z (about 2 years ago)
- Topics: golang, library, string-manipulation
- Language: Go
- Homepage:
- Size: 4.88 KB
- Stars: 0
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# stringtil
A small string utils library which contains PHP inbuilt functions written in Go.
Functions:
--------------------
Reverse - Reverses a string
`stringtil.Reverse(str string)`
Repeat - Repeats a string n times
`stringtil.Repeat(str string, count int)`
Ucfirst - Converts the first letter of the string to uppercase
`stringtil.Ucfirst(str string)`
Ucwords - Converts the first letter of each word to uppercase
`stringtil.Ucwords(str string)`
Substr - Returns substring of string
`stringtil.Substr(str string, startIndex int, length ...int)`
ParseUrl - Splits the query params and returns in Map format
`stringtil.ParseUrl(queryString string)`
Strtr - Translates certain characters in a string
`stringtil.Strtr(str string, fromStr string, toStr string)`