commit | c2e9d88a21c854d72dcda3918750847947105a40 | [log] [tgz] |
---|---|---|
author | Ewout van Bekkum <ewout@google.com> | Thu Apr 29 16:01:27 2021 -0700 |
committer | CQ Bot Account <pigweed-scoped@luci-project-accounts.iam.gserviceaccount.com> | Wed May 12 23:59:13 2021 +0000 |
tree | 91f5f76039e18b83ac754801cc8758b1e31a0571 | |
parent | 38f20f79f3bbc166c08f883755e99366cacb39ea [diff] |
pw_string: add pw::string::Copy methods Adds pw::string::Copy helper methods as a safer alternative to std::strncpy which unfortunately does not always null terminate. In addition, the existing StringCopy methods are renamed to StringOrNullCopy to denote that they support nullptr source strings unlike pw::string::Copy. Change-Id: I046c12da02721c5ad2f6601b9ac742d9dfa90c71 Reviewed-on: https://pigweed-review.googlesource.com/c/pigweed/pigweed/+/42931 Reviewed-by: Ewout van Bekkum <ewout@google.com> Reviewed-by: Wyatt Hepler <hepler@google.com> Reviewed-by: Keir Mierle <keir@google.com> Pigweed-Auto-Submit: Ewout van Bekkum <ewout@google.com> Commit-Queue: Auto-Submit <auto-submit@pigweed.google.com.iam.gserviceaccount.com>
See our website: http://pigweed.dev