Write a function that displays the following menu, reads the selection made and returns the selection as an integer.
Write a C++ program that repeatedly asks for and gets a string from the user and presents the following menu of operations on the string using the above menu function until the user chooses to exit:
1. Search for a character in the string
2. Change a character within the string
3. Display the first n characters of the string
4. Display the last n character of the string
5. Display all characters that lie between two given indices
6. Null the string
7. Exit
Please enter a string: My roommate is not home right now.
Make a selection:
1. Search for a character in the string
2. Change a character within the string
3. Display the first n characters of the string
4. Display the last n character of the string
5. Display all characters that lie between two given indices
6. Null the string
7. Exit
Choice: 1