Scramble function, takes a specified string and randomly scrambles it.
Scramble function, takes a specified string and randomly scrambles it.
Rate Scramble function, takes a specified string and randomly scrambles it.
(1(1 Vote))
Dim g, i, position As Integer
Dim letter, newword As String
g = Len(word)
ReDim scram(1 To g)
For i = 1 To g
scram(i) = ""
Next i
For i = 1 To g
letter = Mid(word, i, 1)
Randomize
Do
position = Int(Rnd * Len(word)) + 1
Loop Until scram(position) = ""
scram(position) = letter
Next i
For i = 1 To g
newword = newword & scram(i)
Next i
scramble = newword
End Function
Scramble function, takes a specified string and randomly scrambles it. Comments
No comments yet — be the first to post one!
Post a Comment