mirror of
https://github.com/ahwootech/BRUTAL.git
synced 2026-11-25 20:48:24 +01:00
SOURCE DUMP v1
This commit is contained in:
parent
bd62d51ec9
commit
fb20299e9d
1 changed files with 768360 additions and 0 deletions
|
|
@ -0,0 +1,21 @@
|
|||
using System.Diagnostics;
|
||||
|
||||
namespace Brutal.Localization.FixedBuffers;
|
||||
|
||||
public static class TryWriteInterpolatedStringHandlerExtensions
|
||||
{
|
||||
extension(MemoryExtensions.TryWriteInterpolatedStringHandler handler)
|
||||
{
|
||||
/// <summary>
|
||||
/// Returns the number of elements currently written to a TryWriteInterpolatedStringHandler.
|
||||
/// </summary>
|
||||
/// <returns>The number of elements written.</returns>
|
||||
public int ElementsWritten()
|
||||
{
|
||||
var shouldBeTrue = MemoryExtensions.TryWrite([], ref handler, out var elementsWritten);
|
||||
Debug.Assert(shouldBeTrue, "TryWrite with empty collection should always succeed.");
|
||||
|
||||
return elementsWritten;
|
||||
}
|
||||
}
|
||||
}
|
||||
Loading…
Reference in a new issue