Guest User

Untitled

a guest
Dec 14th, 2017
62
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.25 KB | None | 0 0
  1. string s = "Like";
  2. string s2 = String.Join(" ", s.Select((x, index) => (index+1) == s.Length ? "" : String.Concat(x, s[index+1])));
  3.  
  4. string s3 = Regex.Replace(s, @"w", m => m.NextMatch().Success ? m.Value + m.NextMatch().Value + " " : "").TrimEnd();
Add Comment
Please, Sign In to add comment