Capitalize in Julia

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

Capitalize in Julia

Welcome to the Capitalize 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
# Capitalize first character of the input string
# Function to print Error message
function err()
  println("Usage: please provide a string")
end
# Function to capitalize the input string
function capitalize(n)
  if (length(n) in [0,1])
    err()
  else
    println(uppercasefirst(n))
  end
end

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

Capitalize 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.