Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/golang-infrastructure/go-stringbuilder
Golang中的strings.Builder并不是真正的Builder模式,连续拼接要换行就很草, 这个库就是修改了一下内置的strings.Builder的签名并加了几个Append方法,用得更爽一些。
https://github.com/golang-infrastructure/go-stringbuilder
utils-library
Last synced: about 2 months ago
JSON representation
Golang中的strings.Builder并不是真正的Builder模式,连续拼接要换行就很草, 这个库就是修改了一下内置的strings.Builder的签名并加了几个Append方法,用得更爽一些。
- Host: GitHub
- URL: https://github.com/golang-infrastructure/go-stringbuilder
- Owner: golang-infrastructure
- License: mit
- Created: 2022-07-24T19:12:34.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2022-11-15T03:01:42.000Z (about 2 years ago)
- Last Synced: 2024-06-20T01:55:56.983Z (7 months ago)
- Topics: utils-library
- Language: Go
- Homepage:
- Size: 6.84 KB
- Stars: 1
- Watchers: 2
- Forks: 1
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Golang String Builder
# 引入依赖
```text
go get -u github.com/golang-infrastructure/go-StringBuilder
```# 说明
Golang中的strings.Builder并不是真正的Builder模式,连续拼接要换行就很草, 这个库就是修改了一下内置的strings.Builder的签名并加了几个Append方法,用得更爽一些。
# Example
```go
builder := string_builder.New()
s := builder.AppendString("test").AppendString(" a is: ").AppendInt(100).String()
fmt.Println(s) // test a is: 100
```