Port NBT impl from LibAC Dart
This commit is contained in:
parent
0a022634c1
commit
ad7b619706
55 changed files with 3226 additions and 2983 deletions
32
NBT/API/StringBuilder.cs
Normal file
32
NBT/API/StringBuilder.cs
Normal file
|
@ -0,0 +1,32 @@
|
|||
using System.Text;
|
||||
|
||||
namespace LibAC.NBT.API
|
||||
{
|
||||
public class StringBuilder
|
||||
{
|
||||
private string _buffer = string.Empty;
|
||||
|
||||
public StringBuilder()
|
||||
{
|
||||
}
|
||||
|
||||
public bool IsEmpty => string.IsNullOrEmpty(_buffer);
|
||||
|
||||
public int Length => _buffer.Length;
|
||||
|
||||
public void Append(string value)
|
||||
{
|
||||
_buffer += value;
|
||||
}
|
||||
|
||||
public void Clear()
|
||||
{
|
||||
_buffer = string.Empty;
|
||||
}
|
||||
|
||||
public override string ToString()
|
||||
{
|
||||
return _buffer;
|
||||
}
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue