mirror of
https://github.com/thunderbrewhq/common.git
synced 2025-12-12 11:12:29 +00:00
feat(string): add copy helper method for RCString source
This commit is contained in:
parent
467c0366e1
commit
54dc7e849f
3 changed files with 13 additions and 0 deletions
|
|
@ -15,6 +15,10 @@ void RCString::Copy(const char* source) {
|
|||
}
|
||||
}
|
||||
|
||||
void RCString::Copy(const RCString& source) {
|
||||
this->Copy(source.GetString());
|
||||
}
|
||||
|
||||
void RCString::Get(char* buf, size_t bufSize) const {
|
||||
const char* str = this->GetString();
|
||||
|
||||
|
|
|
|||
|
|
@ -12,6 +12,7 @@ class RCString : public TRefCnt {
|
|||
// Member functions
|
||||
RCString();
|
||||
void Copy(const char* source);
|
||||
void Copy(const RCString& source);
|
||||
void Get(char* buf, size_t bufSize) const;
|
||||
const char* GetString() const;
|
||||
};
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue