This is a read-only snapshot of the ComputerCraft forums, taken in April 2020.
Mackan90096's profile picture

String randomizer

Started by Mackan90096, 15 May 2013 - 04:31 AM
Mackan90096 #1
Posted 15 May 2013 - 06:31 AM
Hi!
I was bored so I made this string randomizer.

pics:
http://mackos.netai.net/stringrandompics

Features:
  • Infinite amount of strings.
  • Can use numbers. (They will be considered as strings)

Pastebin:

http://pastebin.com/A1bv2idy
FuuuAInfiniteLoop(F.A.I.L) #2
Posted 17 May 2013 - 12:55 PM
Simpler one:

function get(lengh, from)
  str=""
  all = {"0","1","2","3","4","5","6","7","8","9","a","b","c","d","e","f","g", "h","i","j","k","l","m","n","o","p","q","r","s","t","u","v","w","x","y","z","A","B","C","D","E","F","G","H","I","J", "K","L","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z","!","#","$","%","&","/","(",")","="}
  from = from or all
  for i=1, lenght do str = str..from[math.random(1, #all)] end
  return str
end
And you can send a custom table with letters