Example: Reverse a string

    Contents
  1. Description
  2. Source
  3. Solution
  4. Output

Description

Reverse the order of the characters in a give string of characters.

Source

Problem description from Rosetta Code

Solution

class APPLICATION create make feature make -- Demonstrate string reversal. do my_string := "Hello World!" my_string.mirror print (my_string) end my_string: STRING -- Used for reversal end

Output

!dlroW olleH

cached: 04/19/2018 3:03:40.000 AM