Let's say I need to split string like this:
Input string: "My. name. is Bond._James Bond!" Output 2 strings:
I tried this:
int lastDotIndex = inputString.LastIndexOf(".", System.StringComparison.Ordinal);
string firstPart = inputString.Remove(lastDotIndex);
string secondPart= inputString.Substring(lastDotIndex + 1, inputString.Length - firstPart.Length - 1);
Can someone propose more elegant way?