Skip to content

Commit b20250a

Browse files
authored
Update Readme with new exampels
1 parent 884616d commit b20250a

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

README.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,14 @@ stringBuilder.AppendLine("Hello World");
2020
string result = stringBuilder.ToString();
2121
```
2222

23+
There are also smaller helper functions, which enables you to use `ValueStringBuilder` without any instance:
24+
```csharp
25+
using LinkDotNet.StringBuilder;
26+
27+
_ = ValueStringBuilder.Concat("Hello ", "World"); // "Hello World"
28+
_ = ValueStringBuilder.Concat("Hello", 1, 2, 3, "!"); // "Hello123!"
29+
```
30+
2331
## What does it solve?
2432
The dotnet version of the `StringBuilder` is a all purpose version which normally fits a wide variety of needs.
2533
But sometimes low allocation is key. Therefore I created the `ValueStringBuilder`. It is not a class but a `ref struct` which tries to do as less allocations as possible.

0 commit comments

Comments
 (0)