Convert String to Lowercase
Practice this coding question on Coding Gurukul.
Problem statement
A library search box standardizes typed catalogue codes before lookup. Codes may arrive with mixed capitalization, but the stored lookup keys use lowercase letters. Your task Convert every uppercase English letter in the string to its lowercase form. Important details Letters already in lowercase remain unchanged. Preserve the order and number of characters; do not reverse or sort the code. The input contains letters only and has no spaces. Conversion applies to every position, not just the first letter. Print only the normalized code. Worked example The catalogue code CoDeCG becomes codecg. A code already written as shelf remains shelf.
Input format
One nonempty string s.
Output format
Print the lowercase string.
Constraints
1 <= length(s) <= 100000; s contains English letters.
Sample input
CoDeCG
Sample output
codecg
Sign in to run or submit a solution in C++, Java or Python.