title: Splitting a string by a character
body: <p>I know this is a quite easy problem but I just want to solve it for myself once and for all</p>
  
  <p>I would simply like to split a string into an array using a character as the split delimiter. (Much like the C#'s famous <b>.Split()</b> function. I can of course apply the brute-force approach but I wonder if there anything better than that.</p>
  
  <p>So far the I've searched and probably the <b>closest</b> solution approach is the usage of <b>strtok()</b>, however due to it's inconvenience(converting your string to a char array etc.) I do not like using it. Is there any easier way to implement this?</p>
  
  <p><b>Note: </b>I wanted to emphasize this because people might ask "How come brute-force doesn't work". My brute-force solution was to create a loop, and use the <b>substr()</b> function inside. However since it requires the <b>starting point</b> and the length, it fails when I want to split a date. Because user might enter it as 7/12/2012 or 07/3/2011, where I can really tell the length before calculating the next location of '/' delimiter.</p>