Sunday, 1 December 2019

Reverse an array with reverse string value

arr = array("apple", "mango","orange")
str = join(arr,"$")     'str = apple$mango$orange
str = strreverse(str)  'str = egnaro$ognam$elppa 
arr = split(str,"$")    'arr = {egnaro,ognam,elppa} 

for i=lbound(arr) to ubound(arr)
      MsgBox arr(i)
next

No comments:

Post a Comment