Skip to content

Commit

Permalink
[docs] add comment for rust::Str size and length
Browse files Browse the repository at this point in the history
The presence of `size` and `length` confused me, adding a small comment to make it more clear for future readers.
  • Loading branch information
kassens authored Apr 12, 2022
1 parent d8f9c9d commit 3618033
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions book/src/binding/str.md
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 3618033

Please sign in to comment.