Ver Mensaje Individual
  #83 (permalink)  
Antiguo 20/04/2004, 20:04
Avatar de buliwyf
buliwyf
 
Fecha de Ingreso: diciembre-2001
Ubicación: Caracas
Mensajes: 221
Antigüedad: 22 años, 4 meses
Puntos: 1
scramble, shuffle o reordenar un string

a lo mejor a alguien le es util esto.

<%
function scramble(valor)
Randomize
textonuevo=len(valor)
do until textonuevo=0
r=Int((textonuevo - 1 + 1) * Rnd + 1)
nvalor=nvalor&Mid(valor,r,1)&","
valor=replace(valor,Mid(valor,r,1),"",1,1)
textonuevo=textonuevo-1
loop
scramble=nvalor
end function
%>
<%=scramble("aquivacualquiertextoquequierasreorden ar")%>

saludos
__________________
RTFM antes de preguntar...

Última edición por buliwyf; 21/04/2004 a las 06:40