diff options
Diffstat (limited to 'source/FastNBT.h')
-rw-r--r-- | source/FastNBT.h | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/source/FastNBT.h b/source/FastNBT.h index ca801b36f..88d79f4c1 100644 --- a/source/FastNBT.h +++ b/source/FastNBT.h @@ -182,6 +182,14 @@ public: return NetworkToHostDouble8(m_Data + m_Tags[a_Tag].m_DataStart); } + inline AString GetString(int a_Tag) const + { + ASSERT(m_Tags[a_Tag].m_Type == TAG_String); + AString res; + res.assign(m_Data + m_Tags[a_Tag].m_DataStart, m_Tags[a_Tag].m_DataLength); + return res; + } + protected: const char * m_Data; int m_Length; |