src/AnvilPacker/Data/IO/DataWriter.cs
/// <summary> Writes an UTF8 string prefixed with a big-endian ushort indicating it's length. </summary>
Writes an UTF8 string prefixed with a big-endian ushort indicating it's length.
Writes an UTF8 string prefixed with a big - endian ushort indicating it ' s length .
public void WriteUTF(string str)
        {
            WriteString(str, (dw, len) => {
                Ensure.That(len < 65536, "Encoded string cannot be longer than 65535 bytes.");
                dw.WriteUShortBE(len);
            });
        }
public void WriteUTF ( string str ) { WriteString ( str , ( dw , len ) => { Ensure . That ( len < 65536 , " " ) ; dw . WriteUShortBE ( len ) ; } ) ; }
Writes an UTF8 string prefixed with a big-endian ushort indicating it's length.
Writes an UTF8 string prefixed with a big - endian ushort indicating it ' s length .
str
string