mirror of
https://github.com/RGBCube/serenity
synced 2025-07-27 00:17:46 +00:00
AK: Add String::copy(BufferType) helper.
This will create a String from any BufferType that has data() and size().
This commit is contained in:
parent
5eedb22834
commit
ab94a6be00
11 changed files with 31 additions and 27 deletions
|
@ -93,6 +93,8 @@ public:
|
|||
return false;
|
||||
}
|
||||
|
||||
// NOTE: Vector::is_null() exists for the benefit of String::copy().
|
||||
bool is_null() const { return is_empty(); }
|
||||
bool is_empty() const { return size() == 0; }
|
||||
int size() const { return m_size; }
|
||||
int capacity() const { return m_capacity; }
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue