title: Wrap Text for add a strings into a TStringGrid
body: <p>I'm developing a program and one of its feature is a text file downloader. When the user presses the button "Download", the program downloads a text file on a Memo with a defined formatting.</p>
  
  <p>Example 1</p>
  
  <p><blockquote>user_A:italy
    <p>user_B:usa</blockquote></p>
  
  <p>Each data is divided by ":" and I want add these datas into a StringGrid. So I thought to break the string each time that ":" char is found. The first line of the example on the memo becomes:</p>
  
  <p><p>Example 2</p></p>
  
  <blockquote>user_A
    <p>italy</blockquote>
  
  <p>At this point the program adds the lines into a StringGrid, <a href="http://i.imgur.com/YW6EjCf.png" rel="nofollow">here</a> you can see an image as example. I wrote this code:</p>
  
  <pre><code>for i:= 0 to 4096 do
   begin
     if (length(Memo1.Lines.Strings[i])&gt;0) then
      begin
        StringGrid1.Cells[1,i+1]:=Memo1.Lines.Strings[i];
      end
     else
      begin
        break;
      end;
   end;
  </code></pre>
  
  <p>My problem is the following: when the text in the memo is <code>user_A:italy</code> for example, the result isn't a string with 2 lines [user_A(break line)italy], but it's still <code>user_A:italy</code>. I'm using this code:</p>
  
  <pre><code>s:=Memo1.Text;
  s:=WrapText(s, #13#10,[':'],20);
  Memo1.Lines.Add(s);
  </code></pre>
  
  <p>Do you have any suggestion?</p>