Get Substring - everything before certain char
<p>I'm trying to figure out the best way to get everything before the - character in a string.  Some example strings are below.  The length of the string before - varies and can be any length</p>

<pre><code>223232-1.jpg
443-2.jpg
34443553-5.jpg
</code></pre>

<p>so I need the value that's from the start index of 0 to right before -. So the substrings would turn out to be 223232, 443, and 34443553</p>
