RosettaCodeData/Task/Reverse-a-string/PARI-GP/reverse-a-string-3.pari

12 lines
264 B
Plaintext

\\ Version #1 upgraded to complete function. Practically the same.
reverse(str)={return(concat(Vecrev(str)))}
{
\\ TEST2
print(" *** Testing reverse from Version #1:");
print(reverse("ABCDEF"));
my(s,sr,n=10000000);
s="ABCDEFGHIJKL";
for(i=1,n, sr=reverse(s));
}