-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
aaa6971
commit ddb2577
Showing
5 changed files
with
34 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,2 @@ | ||
# Api Documentation | ||
Here you will find an overview over all exposed objects. | ||
Here you will find an overview over all exposed objects and their documentation. |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
# Known Limitations | ||
The base of the `ValueStringBuilder` is a `ref struct`. With that there are certain limitations, which might make it not a good fit for your needs. | ||
* `ref struct`s can only live on the **stack** and therefore can not be a field for a **class** or a non **ref struct**. | ||
* Therefore they can't be boxed to `ValueType` or `Object`. | ||
* Can't be captured ny a lambda expression (aka closure). | ||
* Can't be used in `async` methods. | ||
* Can't be used in methods which use the `yield` keyword | ||
|
||
If not off this applies to your use case, you are good to go. Using `ref struct` is a trade for performance and less allocations in contrast to its use cases. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,2 @@ | ||
- name: Introduction | ||
href: intro.md | ||
- name: Known limitations | ||
href: known_limitations.md |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,22 @@ | ||
# This is the **HOMEPAGE**. | ||
Refer to [Markdown](http://daringfireball.net/projects/markdown/) for how to write markdown files. | ||
## Quick Start Notes: | ||
1. Add images to the *images* folder if the file is referencing an image. | ||
[![.NET](https://github.com/linkdotnet/StringBuilder/actions/workflows/dotnet.yml/badge.svg)](https://github.com/linkdotnet/StringBuilder/actions/workflows/dotnet.yml) | ||
|
||
# ValueStringBuilder: A fast and low allocation StringBuilder for .NET | ||
|
||
**ValueStringBuilder** aims to be as fast as possible with a minimal amount of allocation memory. This documentation will show case you how to use the `ValueStringBuilder` as well as what are some limitations coming with it. If you have questions or feature requests just head over to the [GitHub](https://github.com/linkdotnet/StringBuilder) repository and file and issue. | ||
|
||
## Example | ||
The API is leaning towards the normal `StringBuilder` which is part of the .net framework itself. The main key difference is, that the `ValueStringBuilder` does **not** use the fluent notation of its "big brother". | ||
|
||
```csharp | ||
var stringBuilder = new ValueStringBuilder(); | ||
stringBuilder.AppendLine("Hello"); | ||
stringBuilder.Append("World"); | ||
|
||
Console.Write(stringBuilder.ToString()); | ||
``` | ||
|
||
This will print | ||
``` | ||
Hello | ||
World | ||
``` |