Function Name: switchCase
% Inputs (2): - (char) a string containg a word or phrase
% - (char) a string determining how to modify the previous
% input
% Outputs (1): - (char) the modified string
There can be 4 different ways of modifying the string:
- 'Title Case' -> Capitalizes the first letter of every word. Everything else is lowercase.
- 'Camel Case' -> Capitalizes the first letter of every wordEXCEPT the first one. Everything else is lowercase. All the spaces are removed.
- 'Da Vinci' -> Reverses the string.
- '1337' -> Changes each of the following letters(regardless of capatilization into #
L=1,Z=2,E=3,A=4,S=5,G=6,T=7,B=8,J=9,O=0
Comments
Leave a comment