summaryrefslogtreecommitdiff
path: root/AK/StringImpl.h
diff options
context:
space:
mode:
authorBen Wiederhake <BenWiederhake.GitHub@gmx.de>2020-08-23 12:56:46 +0200
committerAndreas Kling <kling@serenityos.org>2020-08-24 00:45:03 +0200
commit2adc3c61a218f28fe5d817f7cc7ae05e1a927931 (patch)
tree9968caaa2f890998d9d4a7edea6b5fb5ed052569 /AK/StringImpl.h
parent417ca7594b326eba004ce813625dcc1fd25759c2 (diff)
downloadserenity-2adc3c61a218f28fe5d817f7cc7ae05e1a927931.zip
AK: Document that String{,Impl} contains NUL-terminator
Diffstat (limited to 'AK/StringImpl.h')
-rw-r--r--AK/StringImpl.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/AK/StringImpl.h b/AK/StringImpl.h
index 47ae2c6905..e85798a06c 100644
--- a/AK/StringImpl.h
+++ b/AK/StringImpl.h
@@ -59,6 +59,7 @@ public:
~StringImpl();
size_t length() const { return m_length; }
+ // Includes NUL-terminator.
const char* characters() const { return &m_inline_buffer[0]; }
ALWAYS_INLINE ReadonlyBytes bytes() const { return { characters(), length() }; }