https://github.com/leighmcculloch/go-collapsewhitespace
Compact multiple whitespace characters in a string into a single space.
https://github.com/leighmcculloch/go-collapsewhitespace
Last synced: 3 months ago
JSON representation
Compact multiple whitespace characters in a string into a single space.
- Host: GitHub
- URL: https://github.com/leighmcculloch/go-collapsewhitespace
- Owner: leighmcculloch
- License: mit
- Created: 2018-01-28T08:11:20.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2019-01-09T06:40:16.000Z (over 6 years ago)
- Last Synced: 2024-10-11T15:43:06.303Z (8 months ago)
- Language: Go
- Size: 8.79 KB
- Stars: 3
- Watchers: 4
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# collapsewhitespace
[](https://travis-ci.org/leighmcculloch/go-collapsewhitespace)
[](https://goreportcard.com/report/github.com/leighmcculloch/go-collapsewhitespace)
[](https://godoc.org/4d63.com/collapsewhitespace)Efficiently collapse multiple whitespace characters in a string into a single space.
## Usage
```go
import "4d63.com/collapsewhitespace"
``````go
collapsewhitespace.String("a b \nc") // "a b c"
```