Skip to main content

IOExtensions.WriteStringPacketNullable

Declaration#

public static void WriteStringPacketNullable(Stream fs, string value)

Parameters#

NameDescription
fsStream to use
valueValue 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#

NameDescription
fsStream to use
valueValue to write
encodingEncoding 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());    }
}