Index: uspace/lib/cpp/include/impl/string.hpp
===================================================================
--- uspace/lib/cpp/include/impl/string.hpp	(revision 836ecad0a6a34bff70b441989b9f47cafa00a840)
+++ uspace/lib/cpp/include/impl/string.hpp	(revision b08a62cca1f26eb3559736626b233f2f58861fb9)
@@ -320,11 +320,23 @@
              */
 
-            iterator begin() noexcept;
-
-            const_iterator begin() const noexcept;
-
-            iterator end() noexcept;
-
-            const_iterator end() const noexcept;
+            iterator begin() noexcept
+            {
+                return &data_[0];
+            }
+
+            const_iterator begin() const noexcept
+            {
+                return &data_[0];
+            }
+
+            iterator end() noexcept
+            {
+                return begin() + size_;
+            }
+
+            const_iterator end() const noexcept
+            {
+                return begin() + size_;
+            }
 
             reverse_iterator rbegin() noexcept
@@ -348,7 +360,13 @@
             }
 
-            const_iterator cbegin() const noexcept;
-
-            const_iterator cend() const noexcept;
+            const_iterator cbegin() const noexcept
+            {
+                return &data_[0];
+            }
+
+            const_iterator cend() const noexcept
+            {
+                return cbegin() + size_;
+            }
 
             const_reverse_iterator crbegin() const noexcept
@@ -366,9 +384,18 @@
              */
 
-            size_type size() const noexcept;
-
-            size_type length() const noexcept;
-
-            size_type max_size() const noexcept;
+            size_type size() const noexcept
+            {
+                return size_;
+            }
+
+            size_type length() const noexcept
+            {
+                return size_;
+            }
+
+            size_type max_size() const noexcept
+            {
+                return allocator_traits<allocator_type>::max_size(allocator_);
+            }
 
             void resize(size_type n, value_type c);
@@ -376,5 +403,8 @@
             void resize(size_type n);
 
-            size_type capacity() const noexcept;
+            size_type capacity() const noexcept
+            {
+                return capacity_;
+            }
 
             void reserve(size_type res_arg = 0);
@@ -384,5 +414,8 @@
             void clear() noexcept;
 
-            bool empty() const noexcept;
+            bool empty() const noexcept
+            {
+                return size_ == 0;
+            }
 
             /**
@@ -390,19 +423,45 @@
              */
 
-            const_reference operator[](size_type idx) const;
-
-            reference operator[](size_type idx);
-
-            const_reference at(size_type idx) const;
-
-            reference at(size_type idx);
-
-            const_reference front() const;
-
-            reference front();
-
-            const_reference back() const;
-
-            reference back();
+            const_reference operator[](size_type idx) const
+            {
+                return data_[idx];
+            }
+
+            reference operator[](size_type idx)
+            {
+                return data_[idx];
+            }
+
+            const_reference at(size_type idx) const
+            {
+                // TODO: bounds checking
+                return data_[idx];
+            }
+
+            reference at(size_type idx)
+            {
+                // TODO: bounds checking
+                return data_[idx];
+            }
+
+            const_reference front() const
+            {
+                return at(0);
+            }
+
+            reference front()
+            {
+                return at(0);
+            }
+
+            const_reference back() const
+            {
+                return at(size_ - 1);
+            }
+
+            reference back()
+            {
+                return at(size_ - 1);
+            }
 
             /**
@@ -519,5 +578,10 @@
             void swap(basic_string& other)
                 noexcept(allocator_traits<allocator_type>::propagate_on_container_swap::value ||
-                         allocator_traits<allocator_type>::is_always_equal);
+                         allocator_traits<allocator_type>::is_always_equal)
+            {
+                std::swap(data_, other.data_);
+                std::swap(size_, other.size_);
+                std::swap(capacity_, other.capacity_);
+            }
 
             /**
@@ -525,9 +589,18 @@
              */
 
-            const value_type* c_str() const noexcept;
-
-            const value_type* data() const noexcept;
-
-            allocator_type get_allocator() const noexcept;
+            const value_type* c_str() const noexcept
+            {
+                return data_;
+            }
+
+            const value_type* data() const noexcept
+            {
+                return data_;
+            }
+
+            allocator_type get_allocator() const noexcept
+            {
+                return allocator_type{allocator_};
+            }
 
             size_type find(const basic_string& str, size_type pos = 0) const noexcept;
@@ -594,4 +667,10 @@
             int compare(size_type pos1, size_type n1,
                         const value_type* other, size_type n2) const;
+
+        private:
+            value_type* data_;
+            size_type size_;
+            size_type capacity_;
+            allocator_type allocator_;
     };
 }
