title: How to empty a string in Arduino c language
body: <p>I wrote the below in arduino code language (c or c++ ?)
  And i got puzled, i'm not sure if this is a limitation from C or C++.
  My function should split a text string and return word number x
  In my function i need to clean a string variable, that resets its contend until X is reached
  For readability X is called wordcount.</p>
  
  <p>How do i clean the string Wordsample make it empty again ?
  On a side note, if the word isnt found then this function should also return nothing 
  As the results are used to make other strings from.</p>
  
  <pre><code>String GetSubString (String A,int Wordcount) //for readability start counting B from 1
  {   int CounterX;
  String WordSampleN;
  String result ;
  for (int i = 0; i &lt; A.length(); i++)
  {   // split string
      WordSampleN = WordSampleN + A[i];
      if ((A[i] == ' ') || (A[i] =='\n'))
      {   CounterX++;
          if (CounterX == Wordcount)
          {   result = WordSampleN;
          }
          if (CounterX &lt;&gt; WordCount)
          {   WordSampleN = '';  //  &lt;== ERROR IS HERE 
          }
      }
  }
  return result;}
  </code></pre>
  
  <p>On a side note, if possible I would like to keep use strings of any size, not fixed strings.</p>