title: How many bytes does a string have
body: <p>Is there some function which will tell me how many bytes does a string occupy in memory?</p>
  
  <p>I need to set a size of a socket buffer in order to transfer the whole string at once.</p>