File tree Expand file tree Collapse file tree 1 file changed +11
-8
lines changed Expand file tree Collapse file tree 1 file changed +11
-8
lines changed Original file line number Diff line number Diff line change
1
+ [ ![ Go] ( https://github.com/linkdotnet/golang-stringbuilder/actions/workflows/go.yml/badge.svg )] ( https://github.com/linkdotnet/golang-stringbuilder/actions/workflows/go.yml )
2
+ [ ![ Go Report card] ( https://img.shields.io/badge/go%20report-A+-brightgreen.svg?style=flat )] ( https://img.shields.io/badge/go%20report-A+-brightgreen.svg?style=flat )
3
+ [ ![ GoDoc] ( https://pkg.go.dev/badge/github.com/linkdotnet/golang-stringbuilder?status.svg )] ( https://pkg.go.dev/github.com/linkdotnet/golang-stringbuilder?tab=doc )
4
+
1
5
# golang-stringbuilder
2
6
A string builder that has similar capabilities as the one from C#. The goal is to have a straightforward API that lets you work with strings easily.
3
7
4
8
## Install
5
9
6
10
To install the package, call:
7
11
``` bash
8
- go get -u github.com/linkdotnet/golang-stringbuilder
12
+ go get -u github.com/linkdotnet/golang-stringbuilder
9
13
```
10
14
11
- ## Usage
15
+ Next import the package:
12
16
``` golang
13
- package sample
17
+ import ( " github.com/linkdotnet/golang-stringbuilder" )
18
+ ```
14
19
15
- import (
16
- " fmt"
20
+ ## Quickstart
17
21
18
- Text " github.com/linkdotnet/golang-stringbuilder"
19
- )
22
+ The API is derived from the C# ` StringBuilder ` . You can easily append strings or single runes.
20
23
24
+ ``` golang
21
25
func main () {
22
26
sb := Text.StringBuilder {}
23
27
sb.Append (" Hello" )
24
28
sb.Append (" " )
25
29
sb.Append (" World" )
26
30
fmt.Println (sb.ToString ())
27
31
}
28
-
29
32
```
You can’t perform that action at this time.
0 commit comments