mirror of
https://github.com/beefytech/Beef.git
synced 2025-06-10 20:42:21 +02:00
More ctors
This commit is contained in:
parent
ad7c628715
commit
7772041ea1
1 changed files with 21 additions and 0 deletions
|
@ -182,6 +182,18 @@ public:
|
|||
this->mPtr = sv.mPtr;
|
||||
this->mLength = sv.mLength;
|
||||
}
|
||||
|
||||
StringView(const StringView& sv, int offset)
|
||||
{
|
||||
this->mPtr = sv.mPtr + offset;
|
||||
this->mLength = sv.mLength - offset;
|
||||
}
|
||||
|
||||
StringView(const StringView& sv, int offset, int length)
|
||||
{
|
||||
this->mPtr = sv.mPtr + offset;
|
||||
this->mLength = length;
|
||||
}
|
||||
|
||||
StringView(const StringImpl& str);
|
||||
StringView(const StringImpl& str, int offset);
|
||||
|
@ -908,6 +920,15 @@ public:
|
|||
void Append(const StringImpl& str, const StringImpl& str2, const StringImpl& str3);
|
||||
void Append(char c, int count = 1);
|
||||
|
||||
void Release()
|
||||
{
|
||||
if (IsDynAlloc())
|
||||
DeletePtr();
|
||||
this->mLength = 0;
|
||||
this->mPtr = NULL;
|
||||
this->mAllocSizeAndFlags = 0;
|
||||
}
|
||||
|
||||
void Clear()
|
||||
{
|
||||
this->mLength = 0;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue