Answered step by step
Verified Expert Solution
Question
1 Approved Answer
MATLAB Function Name: kirbyCase Inputs: 1. (char) A sentence to be converted to kirby case Outputs: 1. (char) The sentence converted to kirby case Banned
MATLAB
Function Name: kirbyCase Inputs: 1. (char) A sentence to be converted to kirby case Outputs: 1. (char) The sentence converted to kirby case Banned Functions: strrep() Background: You might have heard of camel case, the naming convention typically used when naming variables and functions in MATLAB, but have you ever heard of kirby case? Probably not, since we just made it up! Function Description Write a function that converts a given phrase to kirby case according to the following rules 1. Remove all special characters and punctuation (everything except letters and spaces) 2. Capitalize all letters that occur at the end of a word, and make all other letters lowercase 3. If 'kirby' appears in the string with any capitalization, capitalize all its letters (KIRBY'). Remove all spaces from the sentence 4. Example: out-kirbyCase('I love kirbyCase!') out IlovEKIRBYcasE Notes: . "kirby' will always appear once in the sentence . kirby' may appear as part of another word and should still be in all uppercase. (ex. NoNkirbynonKIRBY' and 'kirBYiNg' KIRBYinG) Punctuation can appear anywhere in the sentence including at the end of a word, and in this case the last letter should still be capitalized Each word will be separated by at least one space The string will always begin with a letterStep by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started