If you have a range of unicode code points that you want to select from, you can generate a random number in that range and then turn it into a one-character string like so:
let codepoint: UInt32 = ...random choice code here...
let scalar = UnicodeScalar(codepoint)
let string = String(scalar)
Comments
If you have a range of unicode code points that you want to select from, you can generate a random number in that range and then turn it into a one-character string like so: