diff options
author | Wyatt Hepler <hepler@google.com> | 2019-12-05 10:52:31 -0800 |
---|---|---|
committer | Wyatt Hepler <hepler@google.com> | 2019-12-09 17:13:47 -0800 |
commit | ee3e02f6cb0ce760135deae93ea2bab19ba8df36 (patch) | |
tree | 35856c4ccdf7825a5dac7ee56baba27089b34920 /pw_string | |
parent | d2e4903a42a6379fbe08f364490046a8f3bdf3d1 (diff) | |
download | pigweed-ee3e02f6cb0ce760135deae93ea2bab19ba8df36.tar.gz |
Expand docs for a few modules
- Add missing README.md for a few modules.
- Start or expand docs.rst.
Change-Id: Ic13c5f71f02259205ba990c93e0403d43f7b44b1
Diffstat (limited to 'pw_string')
-rw-r--r-- | pw_string/README.md | 1 | ||||
-rw-r--r-- | pw_string/docs.rst | 16 |
2 files changed, 10 insertions, 7 deletions
diff --git a/pw_string/README.md b/pw_string/README.md new file mode 100644 index 000000000..2cfee8eb0 --- /dev/null +++ b/pw_string/README.md @@ -0,0 +1 @@ +# pw\_string: Utilities for building strings diff --git a/pw_string/docs.rst b/pw_string/docs.rst index 4c78276c6..a47b08fe9 100644 --- a/pw_string/docs.rst +++ b/pw_string/docs.rst @@ -1,4 +1,4 @@ -.. _chapter-string: +.. _chapter-pw-string: .. default-domain:: cpp @@ -7,14 +7,16 @@ --------- pw_string --------- -The string module provides utilities for working with strings. +The string module provides efficient utilities for safely working with strings. +The pw_string functions and classes always null-terminate strings and never +overrun buffers. They do not allocate their own memory. -Requirements +Compatibility ============= C++17 -Module Dependencies -------------------- +Dependencies +============ * pw_preprocessor * pw_status * pw_span @@ -39,8 +41,8 @@ using ``Format``. pw::StringBuilder ----------------- StringBuilder facilitates building formatted strings in a fixed-size buffer. -StringBuilder is safe, flexible, and results in much smaller code size than -using std::ostringstream. However, applications sensitive to code size should +It is designed to give the flexibility of std::string and std::ostringstream, +but with a small footprint. However, applications sensitive to code size should use StringBuilder with care. Size report: replacing snprintf with pw::StringBuilder |