Move more string-related extensions

This commit is contained in:
Matt Nadareski
2026-03-21 21:59:14 -04:00
parent 6dc531dad7
commit 5b2338aa6f
11 changed files with 816 additions and 743 deletions

View File

@@ -9,6 +9,8 @@ namespace SabreTools.Text.Extensions
/// </summary>
public static class ByteArrayWriterExtensions
{
#region Write Null Terminated
/// <summary>
/// Write a null-terminated string to the array
/// </summary>
@@ -62,6 +64,10 @@ namespace SabreTools.Text.Extensions
public static bool WriteNullTerminatedUTF32String(this byte[] content, ref int offset, string? value)
=> content.WriteNullTerminatedString(ref offset, value, Encoding.UTF32);
#endregion
#region Write Prefixed
/// <summary>
/// Write a byte-prefixed ASCII string to the byte array
/// </summary>
@@ -144,6 +150,8 @@ namespace SabreTools.Text.Extensions
return WriteFromBuffer(content, ref offset, buffer);
}
#endregion
/// <summary>
/// Write an array of bytes to the byte array
/// </summary>