mirror of
https://github.com/SabreTools/SabreTools.IO.git
synced 2026-09-22 22:56:13 +00:00
Move more string-related extensions
This commit is contained in:
@@ -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>
|
||||
|
||||
Reference in New Issue
Block a user