0

What I'm trying to do is to generate a random string of numbers e.g. 2645237 and one char in a string in the range of A-Z e.g. W and combine the two strings to make string like this for example(((lkjlkj2645237W))). I can generate a random number with no problem. What I'm stuck on is

  1. Generating a random Char as a string.
  2. Combining the two strings to create one string.
  • You could inizialize one string which contains all chars that are possible for the random char (var test = "ABCD...XYZ";) And than grab a substring with the length of 1 from a random position of that string. To combine the two you can concat the two strings (var combined = randomNumberString + randomCharString;) Or use the concat function of the string type. – Olli May 27 '22 at 10:47

0 Answers0