Capitalize in Euphoria

Published on 17 February 2023 (Updated: 17 February 2023)

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

Current Solution

include std/io.e
include std/text.e

procedure usage()
    puts(STDOUT, "Usage: please provide a string\n")
    abort(0)
end procedure

function capitalize(sequence s)
    return upper(s[1]) & s[2..$]
end function

-- Parse 1st command-line argument
sequence argv = command_line()
if length(argv) < 4 or length(argv[4]) = 0
then
    usage()
end if

-- Capitalize string and show it
sequence s = argv[4]
s = capitalize(s)
printf(STDOUT, "%s\n", {s})

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