retesere20

char-to-str

Nov 19th, 2020 (edited)
32
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. "1234567890"
  2. "abcdefghijklmnopqrstuvwxyz"
  3. "ABCDEFGHIJKLMNOPQRSTUVWXYZ"
  4. "~`!@#$%^&*()_-+={[}]|\:"'<,>.?/ " (last 2 are space & tab here)
  5.  
  6.  
  7. using System;
  8. using System.Text;
  9. using System.Collections.Generic;
  10. using System.Linq;
  11. using System.Text.RegularExpressions;
  12.  
  13. namespace Rextester
  14. {
  15. public class Program
  16. {
  17. public static void Main(string[] args)
  18. {
  19. //Your code goes here
  20. Console.WriteLine("Hello, world!");
  21. byte[] bytes = Encoding.Default.GetBytes("abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ1234567890~`!@#$%^&*()_-+={[}]|\\:;\"'<,>.?/ ""+Environment.NewLine);
  22.  
  23. string str = Encoding.Default.GetString(bytes);
  24. var i=0;
  25. char[] characters = str.ToCharArray();
  26. foreach (var a in bytes){
  27. Console.WriteLine( "else if (str_==\""+a.ToString()+"\") then out_=str_.Replace(\""+a.ToString()+"\", \""+ characters[i].ToString() +"\");" );
  28. i++;
  29. }
  30.  
  31. }
  32. }
  33. }
RAW Paste Data