title: Best way to split string by last occurrence of character?
body: <p>Let's say I need to split string like this:</p>
  
  <p>Input string: "My. name. is Bond._James Bond!"
  Output 2 strings:</p>
  
  <ol>
  <li>"My. name. is Bond"</li>
  <li>"_James Bond!"</li>
  </ol>
  
  <p>I tried this:</p>
  
  <pre><code>int lastDotIndex = inputString.LastIndexOf(".", System.StringComparison.Ordinal);
  string firstPart = inputString.Remove(lastDotIndex);
  string secondPart= inputString.Substring(lastDotIndex + 1, inputString.Length - firstPart.Length - 1);
  </code></pre>
  
  <p>Can someone propose more elegant way?</p>