Reverse String in Julia

Published on 28 April 2022 (Updated: 27 November 2022)

Reverse String in Julia

Welcome to the Reverse String in Julia page! Here, you'll find the source code for this program as well as a description of how the program works.

Current Solution

#!/usr/bin/julia
# Reverse the Input String
# Function to print Error Message
function err()
  println("Usage: please provide a string")
end
# Function to reverse the input string
function reverse_string(n)
  if (length(n) in [0,1])
    err()
  else
    println(reverse(n))
  end
end

try
  reverse_string(ARGS[1])
catch e
  err()
end

Reverse String in Julia was written by:

If you see anything you'd like to change or update, please consider contributing.

How to Implement the Solution

No 'How to Implement the Solution' section available. Please consider contributing.

How to Run the Solution

No 'How to Run the Solution' section available. Please consider contributing.