mirror of
https://github.com/RGBCube/serenity
synced 2025-07-27 17:27:35 +00:00
Add a Chomp feature to String construction that removes a trailing newline.
This will be useful in many situations.
This commit is contained in:
parent
90bab5ea71
commit
8135952832
4 changed files with 19 additions and 9 deletions
|
@ -24,13 +24,13 @@ public:
|
|||
{
|
||||
}
|
||||
|
||||
String(const char* cstring)
|
||||
: m_impl(StringImpl::create(cstring))
|
||||
String(const char* cstring, ShouldChomp shouldChomp = NoChomp)
|
||||
: m_impl(StringImpl::create(cstring, shouldChomp))
|
||||
{
|
||||
}
|
||||
|
||||
String(const char* cstring, size_t length)
|
||||
: m_impl(StringImpl::create(cstring, length))
|
||||
String(const char* cstring, size_t length, ShouldChomp shouldChomp = NoChomp)
|
||||
: m_impl(StringImpl::create(cstring, length, shouldChomp))
|
||||
{
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue