diff options
author | Andreas Kling <awesomekling@gmail.com> | 2019-07-08 15:38:44 +0200 |
---|---|---|
committer | Andreas Kling <awesomekling@gmail.com> | 2019-07-08 15:38:44 +0200 |
commit | 0e75aba7c39c7a2d3b0becc2416aa0e251d62070 (patch) | |
tree | 19bc08a69423db6ab1c6669c06eaab81f494a564 /AK/AKString.h | |
parent | 567551bc12945c25b49c65579ceb545668dbb7eb (diff) | |
download | serenity-0e75aba7c39c7a2d3b0becc2416aa0e251d62070.zip |
StringView: Rename characters() to characters_without_null_termination().
This should make you think twice before trying to use the const char* from
a StringView as if it's a null-terminated string.
Diffstat (limited to 'AK/AKString.h')
-rw-r--r-- | AK/AKString.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/AK/AKString.h b/AK/AKString.h index b1e8b74547..a2bafbc6bf 100644 --- a/AK/AKString.h +++ b/AK/AKString.h @@ -41,7 +41,7 @@ public: if (view.m_impl) m_impl = *view.m_impl; else - m_impl = StringImpl::create(view.characters(), view.length()); + m_impl = StringImpl::create(view.characters_without_null_termination(), view.length()); } String(const String& other) |