Capitalize in Every Language

Published on 31 March 2019 (Updated: 02 May 2020)

Capitalize in Every Language

In this article, we’ll tackle the Capitalize program, its requirements, and how to test it.


This simple program picks a string and return the first letter of it in uppercase.


For this sample program, each solution should return the string with the first letter in uppercase. In other words, do not change anything else about the input string.

string -> String
react -> React
java -> Java
car -> Car
a long string term -> A long string term

In addition, there should be some error handling for situations where the user doesn’t input a string.


Feel free to use the following table when testing capitalize programs

Description Input Output
No input   Usage: please provide a string
Empty input "" Usage: please provide a string
Lowercase String hello Hello
Uppercase String Hello Hello
Long String hello world Hello world
Mixed Casing heLLo World HeLLo World
Symbols 12345 12345


Currently, there are no articles. If you’d like to begin contributing, head over to the repo to get started.

Further Reading