| commit | d7b8a6e34c91f8c2c09015f389ac8f7e20909e75 | [log] [tgz] |
|---|---|---|
| author | David Tolnay <dtolnay@gmail.com> | Fri Apr 24 16:22:55 2020 -0700 |
| committer | David Tolnay <dtolnay@gmail.com> | Fri Apr 24 16:22:55 2020 -0700 |
| tree | fa7f4d23cd4ffafa0e9923ac1e61872a2c4dc7a3 | |
| parent | 7a9b1301acfaaa556051230600f5ef86dd77e592 [diff] |
Link to std::string::empty
diff --git a/src/cxx_string.rs b/src/cxx_string.rs index d3d128c..baad468 100644 --- a/src/cxx_string.rs +++ b/src/cxx_string.rs
@@ -36,6 +36,10 @@ } /// Returns true if `self` has a length of zero bytes. + /// + /// Matches the behavior of C++ [std::string::empty][empty]. + /// + /// [empty]: https://en.cppreference.com/w/cpp/string/basic_string/empty pub fn is_empty(&self) -> bool { self.len() == 0 }