diff --git a/include/stdplus/str/buf.hpp b/include/stdplus/str/buf.hpp
index 2725e21..1870619 100644
--- a/include/stdplus/str/buf.hpp
+++ b/include/stdplus/str/buf.hpp
@@ -328,6 +328,11 @@
         return as.store.dyn.ptr + oldlen;
     }
 
+    constexpr void push_back(CharT c) noexcept
+    {
+        *append(1) = c;
+    }
+
     constexpr void shrink(std::size_t amt) noexcept
     {
         if (as.isDyn())
@@ -340,7 +345,7 @@
         }
     }
 
-    constexpr void reset() noexcept
+    constexpr void clear() noexcept
     {
         if (as.isDyn())
         {
@@ -352,16 +357,26 @@
         }
     }
 
-    constexpr CharT* begin() noexcept
+    constexpr CharT* data() noexcept
     {
         return as.isDyn() ? as.store.dyn.ptr : as.store.inl.ptr;
     }
 
-    constexpr const CharT* begin() const noexcept
+    constexpr const CharT* data() const noexcept
     {
         return as.isDyn() ? as.store.dyn.ptr : as.store.inl.ptr;
     }
 
+    constexpr CharT* begin() noexcept
+    {
+        return data();
+    }
+
+    constexpr const CharT* begin() const noexcept
+    {
+        return data();
+    }
+
     constexpr CharT* end() noexcept
     {
         return begin() + size();
diff --git a/include/stdplus/str/conv.hpp b/include/stdplus/str/conv.hpp
index e0cf810..070efa3 100644
--- a/include/stdplus/str/conv.hpp
+++ b/include/stdplus/str/conv.hpp
@@ -85,7 +85,7 @@
   public:
     constexpr std::basic_string_view<CharT> operator()(const T::type& v)
     {
-        buf.reset();
+        buf.clear();
         T{}(buf, v);
         return buf;
     }
diff --git a/test/str/buf.cpp b/test/str/buf.cpp
index 904a59d..cd9580a 100644
--- a/test/str/buf.cpp
+++ b/test/str/buf.cpp
@@ -26,7 +26,7 @@
     auto old_ptr = buf.begin();
 
     // Ensure that we inline small amounts of data only
-    std::copy(data.begin(), data.begin() + 4, buf.append(4));
+    std::copy(data.begin(), data.begin() + 4, std::back_inserter(buf));
     EXPECT_EQ(buf.begin(), old_ptr);
     EXPECT_EQ(buf.size(), 4);
     EXPECT_EQ(std::string_view(data).substr(0, 4), buf);
@@ -152,7 +152,7 @@
 {
     StrBuf buf1;
     buf1.append(data.size());
-    buf1.reset();
+    buf1.clear();
     buf1.append(1)[0] = 'a';
     StrBuf buf2 = buf1;
     StrBuf buf3;
diff --git a/test/str/conv.cpp b/test/str/conv.cpp
index 3a2f41c..969258d 100644
--- a/test/str/conv.cpp
+++ b/test/str/conv.cpp
@@ -103,7 +103,7 @@
     StrBuf buf;
     ToStrAdap<ToStr<TestValS>>{}(buf, TestValS{});
     EXPECT_EQ("test", buf);
-    buf.reset();
+    buf.clear();
     auto ptr = buf.append(4);
     EXPECT_EQ(4, ToStrAdap<ToStr<TestValS>>{}(ptr, TestValS{}) - ptr);
     EXPECT_EQ("test", std::string_view(ptr, 4));
