Advertisement
Guest User

Untitled

a guest
Jan 23rd, 2017
82
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.16 KB | None | 0 0
  1. string testString = "lorem ipsum alpha%charlie lorem ipsum";
  2.  
  3. int index = testString.IndexOf("%");
  4.  
  5. string newString = testString.Substring(0, index);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement