Improve string camelization method
<blockquote>
  <p><strong>Possible Duplicate:</strong><br>
  <a href="http://stackoverflow.com/questions/1206019/converting-string-in-c">Converting string in C#</a>  </p>
</blockquote>



<p>I want to "camelize" a string, for example:</p>

<ul>
<li>PARTS/ACESSORIES -> Parts/Accessories   </li>
<li>HELLO WORLD/TEST -> Hello World/Test</li>
<li>Hello World -> Hello World</li>
</ul>

<p>Here's what i have so far:</p>

<pre><code>  public static string Camelize(this string str)
    {
        if (String.IsNullOrEmpty(str)) return "";

        var sb = new StringBuilder();
        char[] chars = str.ToLower().ToCharArray();
        bool upper = true;            
        // ' ', '-', '.', '/'
        for (int i = 0; i &lt; chars.Length; ++i)
        {
            char c = chars[i];
            if (i == 0 || //First char 
                chars[i - 1] == ' ' ||
                chars[i - 1] == '-' ||
                chars[i - 1] == '.' ||
                chars[i - 1] == '/'
                ) upper = true;

            if (upper)             
                sb.Append(Char.ToUpper(c));                
            else                
                sb.Append(c);

            upper = false;
        }
        return sb.ToString();
    }
</code></pre>

<p>Is there any way to improve this method, also I know that strings will not exceed 250 chars?
Thanks</p>
