Jump to content

_RandomString()


tttommeke
 Share

Recommended Posts

Creates a random string with numbers, low and high chars. Good for when you need a random name for a variable,file,...

$StringArray = StringSplit("ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789","")
Func _Randomstring($Lenght)
$String = ""
$I = 0
Do
$String = $String & $StringArray[Random(1,$Stringarray[0])]
$I += 1
Until $I = $Lenght
Return $String
EndFunc

Call it like :

_Randomstring(5)

To get a string from 5 characts

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...