I want to take any String and be able to remove everything except the last four letters. Is it possible to do that? I’ve looked at String.Split and Trim, but I don’t fully understand how to use them with my situation. Any help?
1 Answer
1string s1 = “read the docs”;
string s2 = s1.Substring(s1.Length - 4); // s2==“docs”;
Look at the documentation
– Benproductions1