<-- Previous || Up || Next -->

Shuffle String Function
Character Arrays Class

Public Function ShuffleString( _
    ByVal vValue As Variant _
    ) As Variant

Shuffle the characters within a string.
Randomly rearranges the characters within the string.

Examples:
    Rnd(-1) = 0.224007
    ShuffleString("12345") = "51234"
    ShuffleString("12345") = "54312"
See also:
    SortString Function
    ShuffleStringSegments Function
    RandomCapitalize Function
Note: This function is "volatile" because it uses the random number generator to select the new positions for each character. If you use the Visual Basic Rnd function to seed the random number generator as in the examples above, you can reproduce the same results as are shown. There is generally no need to call the Rnd function within your programs since Entisoft Tools initializes the Visual Basic random number generator once with "Randomize" statement.

vValue: String containing the characters whose positions are to be rearranged. Function returns Null if vValue is Null or cannot be fixed up to a String.

Copyright 1996-1999 Entisoft
Entisoft Tools is a trademark of Entisoft.