Question: C++ programming questions- please help mirrorEnds // // Given a string, look for a mirror image (backwards) string at both the beginning // and end

C++ programming questions- please help

mirrorEnds // // Given a string, look for a mirror image (backwards) string at both the beginning // and end of the given string. In other words, zero or more characters at the very // beginning of the given string, and at the very end of the string in reverse order // (possibly overlapping). For example, the string "abXYZba" has the mirror end "ab". // // mirrorEnds("abXYZba") return "ab" // mirrorEnds("abca") returns "a" // mirrorEnds("aba") returns "aba" // std::string mirrorEnds(std::string str) { // TODO: Complete this function } starOut // // Return a version of the given string, where for every star (*) in the string // the star and the chars immediately to its left and right are gone. // So "ab*cd" yields "ad" and "ab**cd" also yields "ad". // //starOut("ab*cd") returns "ad" //starOut("ab**cd") returns "ad" //starOut("sm*eilly") returns "silly" // std::string starOut(std::string str) { // TODO: Complete this function return "Under construction"; }
allAsLeft // Given a String, return the same characters in the std::string in the same // order except all upper case 'A's are to the left. // // allAsLeft("") returns "" // allAsLeft("A") returns "A" // allAsLeft("G") returns "G" // allAsLeft("AB") returns "AB" // allAsLeft("BA") returns "AB" // allAsLeft("ABCaDEFGaA") returns "AABCaDEFGa"; // std::string allAsLeft(std::string str) {

// TODO: Complete this function return "Under construction";

}

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!