1
0
mirror of https://github.com/VCMP-SqMod/SqMod.git synced 2024-11-08 00:37:15 +01:00

Update Buffer.hpp

This commit is contained in:
Sandu Liviu Catalin 2021-06-11 17:24:54 +03:00
parent 1e68f1b796
commit ccfae607d7

View File

@ -762,6 +762,22 @@ public:
o.m_Cap = n;
}
/* --------------------------------------------------------------------------------------------
* Retrieve the buffer as a string.
*/
String ToStr() const
{
return m_Ptr ? String(Get< String::value_type >(), Position()) : String();
}
/* --------------------------------------------------------------------------------------------
* Retrieve the buffer as a string.
*/
String ToStr(SzType p) const
{
return m_Ptr ? String(Get< String::value_type >(), ClampMax(p, m_Cap)) : String();
}
/* --------------------------------------------------------------------------------------------
* Write a portion of a buffer to the internal buffer.
*/