title: create_string_buffer how to get used size
body: <p>How can I determine the used size/length of a buffer created with create_string_buffer?</p>
  
  <pre><code>buffer = create_string_buffer(1000)
  </code></pre>
  
  <p>e.g. in buffer I have 3 values and 997 unused -> how it's possible to get the 3?</p>