What you are trying to achieve is easy to implement.
Run a while loop on the string until spaces are found (using
IndexOf
).
Till you keep getting a blank, replace with a random number.
Have a look at the
String.Replace
method[
^].
Pseudo code would look like -
while (s.IndexOf(' ') != -1)<br />
{<br />
s.Replace(' ' ,RandomNumber.ToString();<br />
}