Question: Case Insensitive Comparison Write a function int icompare (std: string first, std: string second) which returns a negative number if the first string comes before

Case Insensitive Comparison Write a function int icompare (std: string first, std: string second) which returns a negative number if the first string comes before the second alphabetically, returns 0 if both strings are equal, and a positive number if the second string comes after the second alphabetically. This function should compare strings ignoring case differences, i.e. "Hello" = = "hello" or in other words icompare("Hello", "hello") ==0. Note: This function behaves similar to compare from the standard library. 20 points Find String Write a function bool contains(std::string reference, std::string value) which returns true if the reference string contains value within it. For example contains("Hello, World", "lo") true but contains("Hello, World", "lo Wo") false. Note: This function behaves just like contains from the standard library, however you may not use this function in your implementation. You may not use any of the find functions either
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
