Thread: array.reverse()
View Single Post
  #1  
Old 06-07-2009, 03:12 AM
cbk1994 cbk1994 is offline
the fake one
cbk1994's Avatar
Join Date: Mar 2003
Location: San Francisco
Posts: 10,718
cbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond repute
Send a message via AIM to cbk1994
array.reverse()

or array.flip()

It reverses (or flips) the order of an array. I don't think I need to illustrate this, but I will anyway.

a, d, s, h, r
array.reverse()
r, h, s, d, a

It would also be great to have

array.reverse(start index, end index)

a, d, s, h, r
array.reverse(1, 3)
a, h, s, d, r
__________________
Reply With Quote