From 6c85c941748a5ff03f838dd038b109fb2cb5c221 Mon Sep 17 00:00:00 2001 From: Jan Kassens Date: Tue, 12 Apr 2022 11:51:36 -0400 Subject: [PATCH] [docs] add comment for rust::Str size and length The presence of `size` and `length` confused me, adding a small comment to make it more clear for future readers. --- book/src/binding/str.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/book/src/binding/str.md b/book/src/binding/str.md index 9c1e0a773..6ee65ffe6 100644 --- a/book/src/binding/str.md +++ b/book/src/binding/str.md @@ -28,7 +28,9 @@ public: // Note: no null terminator. const char *data() const noexcept; + // Length in bytes size_t size() const noexcept; + // Length in bytes, alias for `size()` size_t length() const noexcept; bool empty() const noexcept;