Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- string[] text = textBoxInput.Text.Split(' ');
- List<string> replacements = new List<string>();
- for(int i = 0; i < text.Length; i++)
- {
- if(replacements.Contains(text[i]))
- {
- text[i] = ">" + replacements.IndexOf(text[i]).ToString() + "<";
- }
- else
- {
- replacements.Add(text[i]);
- text[i] = "(" + replacements.IndexOf(text[i]) + ")" + text[i];
- }
- }
- textBoxOutput.Text = String.Join(" ", text);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement