2
How to delete a part of the string until it reaches the ":" character. I was able to delete ":" using the code below:
Example String: uma_phrase_random: Ronison
string url = empresaweb2;
string resultado = url.Substring(0, url.IndexOf(':'));
txbEmpresa.Text = resultado;
Result: a random phrase
Since the result I desire is only the name: Ronison
Remembering that I don’t know the length of the sentence before the name.
Try this...
url.Substring(url.IndexOf(':'), url.Length - 1);
You start substring from the point where it is : and go to the end of the string– Kevin Kouketsu