SHARE
TWEET

Untitled

a guest Feb 17th, 2019 62 in 246 days
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. public static string rle_decode(string msg)
  2.         {
  3.             int i = 0;
  4.             string convertedString = "";
  5.             foreach (int currentChar in msg)
  6.             {
  7.                 if (currentChar < 58 && currentChar > 47)
  8.                 {
  9.                     i = currentChar - 48;
  10.                 }
  11.                 else
  12.                 {
  13.                     while (i>0)
  14.                     {
  15.                         convertedString = convertedString + (char)currentChar;
  16.                         i--;
  17.                     }
  18.                 }
  19.             }
  20.  
  21.             return convertedString;
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top