SanAndreasUnity/Assets/Scripts/Importing/RenderWareStream/String.cs

18 lines
450 B
C#
Raw Normal View History

2020-05-31 17:07:22 +00:00
using SanAndreasUnity.Utilities;
using System.IO;
using System.Text;
namespace SanAndreasUnity.Importing.RenderWareStream
{
[SectionType(2)]
public class String : SectionData
{
public readonly string Value;
public String(SectionHeader header, Stream stream)
: base(header, stream)
{
Value = Encoding.UTF8.GetString(stream.ReadBytes((int)header.Size)).TrimNullChars();
}
}
}