IOExtensions.WriteStringPacketNullable
Declaration#
public static void WriteStringPacketNullable(Stream fs, string value)Parameters#
| Name | Description |
|---|---|
| fs | Stream to use |
| value | Value to write |
Description#
Write a nullable string packet to a stream
Usage#
Example
using NullSave.GDTK;using System.IO;using UnityEngine;
public class ExampleObject : MonoBehaviour{
private void Start() { MemoryStream ms = new MemoryStream(); ms.WriteStringPacketNullable("Hello World");
ms.Seek(0, SeekOrigin.Begin); Debug.Log("Result: " + ms.ReadStringPacketNullable()); }
}Declaration#
public static void WriteStringPacketNullable(Stream fs, string value, Encoding encoding)Parameters#
| Name | Description |
|---|---|
| fs | Stream to use |
| value | Value to write |
| encoding | Encoding to use |
Description#
Write a nullable string packet to a stream
Usage#
Example
using NullSave.GDTK;using System.IO;using UnityEngine;
public class ExampleObject : MonoBehaviour{
private void Start() { MemoryStream ms = new MemoryStream(); ms.WriteStringPacketNullable("Hello World", System.Text.Encoding.UTF32);
ms.Seek(0, SeekOrigin.Begin); Debug.Log("Result: " + ms.ReadStringPacketNullable()); }
}