title: Limit line width without cutting words
body: <p>I currently use this code to limit lines to 20 characters:</p>
  
  <pre><code>if (string.length() % 20 == 0 &amp;&amp; string.length() &gt;= 20) {
      this.string += "\n";
  }
  </code></pre>
  
  <p>However, it breaks words like this:</p>
  
  <pre><code>Hello, my name is Pa
  trick
  </code></pre>
  
  <p>How can i prevent this?</p>