Skip to content

Commit 3618033

Browse files
authored
[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.
1 parent d8f9c9d commit 3618033

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

book/src/binding/str.md

+2
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,9 @@ public:
2828
2929
// Note: no null terminator.
3030
const char *data() const noexcept;
31+
// Length in bytes
3132
size_t size() const noexcept;
33+
// Length in bytes (alias for `size()`)
3234
size_t length() const noexcept;
3335
bool empty() const noexcept;
3436

0 commit comments

Comments
 (0)