Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Random rnd = new Random((int) DateTime.Now.Ticks & 0x0000FFFF);
- string text = project.Variables["text"].Value;
- int length = text.Length;
- string new_text = String.Empty;
- int max = rnd.Next(1, 3);
- int curr = 0;
- for (int i = 0; i < length; i++) {
- if ((rnd.Next(0, 3) == 1) && (i != 0) && (i != length) && (curr <= max)) {
- new_text += ".";
- new_text += text[i];
- curr++;
- } else {
- new_text += text[i];
- }
- }
- return new_text;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement