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: 10/22/2017 10:47:52.000 PM