Guest User

Untitled

a guest
Jun 18th, 2018
99
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.78 KB | None | 0 0
  1. sortinfo = sortinfo.Remove(0, 500);
  2. sortinfo = new string(sortinfo.SkipWhile(c => !char.IsDigit(c)).ToArray());
  3.  
  4. class Program
  5. {
  6. static void Main(string[] args)
  7. {
  8. string str;
  9. str=TrimSortInfo("23:value,ord4er24:valueag4ain,order6again15:value,order"); // breaking value
  10. //str = TrimSortInfo("23:value,order24:valueagain,orderagain15:value,order"); //working value
  11. Console.WriteLine(str);
  12. Console.ReadLine();
  13.  
  14. }
  15.  
  16. static string TrimSortInfo(string sortinfo)
  17. {
  18. if (sortinfo.Length > 15)
  19. {
  20. sortinfo = sortinfo.Remove(0, 15);
  21. sortinfo = new string(sortinfo.SkipWhile(c => !char.IsDigit(c))
  22. .ToArray());
  23. return sortinfo;
  24. }
  25. return sortinfo;
  26. }
  27. }
Add Comment
Please, Sign In to add comment