-
Notifications
You must be signed in to change notification settings - Fork 8
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
887131a
commit 78209a8
Showing
1 changed file
with
17 additions
and
1 deletion.
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,18 @@ | ||
# HintBuilding Extensions | ||
RueI provides extensions to [StringBuilder](https://learn.microsoft.com/en-us/dotnet/api/system.text.stringbuilder?view=net-7.0) | ||
RueI provides extensions to [StringBuilder](https://learn.microsoft.com/en-us/dotnet/api/system.text.stringbuilder?view=net-7.0) through the [HintBuilding](api/extensions/hintbuilding/hintbuilding.html) class. this provides a large number of methods on StringBuilder to make adding tags easier and less error-prone. | ||
|
||
to use this, you first bring the class into scope: | ||
```csharp | ||
using RueI.Extensions.HintBuilding; | ||
``` | ||
then, you can use it like so: | ||
btw im gonna waste time to make a dumb little stringbuilder extensions thing so you can do shit like | ||
```csharp | ||
StringBuilder sb = new() | ||
.SetColor(255, 0, 0) | ||
.SetSize(1.5, MeasurementStyle.Ems) | ||
.Append("hello!") | ||
.CloseColor() | ||
.CloseSize(); | ||
``` | ||
since all of the methods return the original StringBuilder, you can chain them easily. |