Answered step by step
Verified Expert Solution
Link Copied!

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

image text in transcribedMATLAB

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 letter

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Database Marketing The Ultimate Marketing Tool

Authors: Edward L. Nash

1st Edition

0070460639, 978-0070460638

More Books

Students also viewed these Databases questions