https://github.com/lestrrat-go/xstrings
Unicode-aware string utilities for Go
https://github.com/lestrrat-go/xstrings
Last synced: about 2 months ago
JSON representation
Unicode-aware string utilities for Go
- Host: GitHub
- URL: https://github.com/lestrrat-go/xstrings
- Owner: lestrrat-go
- License: mit
- Created: 2021-02-17T02:22:01.000Z (over 4 years ago)
- Default Branch: main
- Last Pushed: 2022-09-01T08:07:43.000Z (almost 3 years ago)
- Last Synced: 2024-06-18T21:48:09.766Z (about 1 year ago)
- Language: Go
- Size: 19.5 KB
- Stars: 22
- Watchers: 2
- Forks: 3
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Funding: .github/FUNDING.yml
- License: LICENSE
Awesome Lists containing this project
README
# github.com/lestrrat-go/xstrings  [](https://pkg.go.dev/github.com/lestrrat-go/xstrings) [](http://codecov.io/github/lestrrat-go/xstrings?branch=main)
Unicode-aware string utilities for Go
# DESCRIPTION
Many string utilities available on the web only work with characters in ASCII range.
This library does The Right Thing and goes through the proper `unicode` / `unicode/utf8`
decoding routines before processing the strings# AVAILABLE FUNCTIONS
| Name | Description |
|------|-------------|
| LcFirst(string) string | Converts first rune of string to lower case |
| UcFirst(string) string | Converts first rune of string to upper case |
| Snake(string, SnakeOptions...) | Converts a string into snake_case. Supports alternate delimiters and SCREAMING case via options |
| Camel(string, CamelOptions...) | Converts a string into CamelCase. Supports lowerCaseCame via options|
| FirstNRunes(strings, int) | Returns a strings consisting of the first N runes in the string|