title: Why is this strpos() returning an error?
body: <p>I'm trimming a string in an excerpt as follows:</p>
  
  <pre><code>$mod_trim_to = strpos(get_the_excerpt(), ' ', 115);
  $trimmed_exceprt = substr(get_the_excerpt(),0,$mod_trim_to);
  </code></pre>
  
  <p>The goal here is to trim the excerpt to 115 characters in cases where it's being auto-generated and breaking the bounds of a very small space, as specified by the third party graphic designer.</p>
  
  <p>The function returns properly, but also throws a warning:</p>
  
  <pre><code>PHP Warning:  strpos(): Offset not contained in string
  </code></pre>
  
  <p>I can only guess that strpos() doesn't like searching for a space? What is the correct way to write this so I don't end up with an error log?</p>
  
  <p>Thanks</p>