Question: I need to write a C++ program of the 2nd picture using the string function strVar.subtr of the frist pic . Can someone please help

I need to write a C++ program of the 2nd picture usingthe string function strVar.subtr of the frist pic . Can someone pleaseI need to write a C++ program of the 2nd picture using the string function strVar.subtr of the frist pic . Can someone please help me with that?

TABLE 71 Some string functions (continued) Expression Effect Returns the index of the first occurrence of str in strVar. If str is not found, the special value string: :npos is returned strVar.find (str) Returns the index of the first occurrence at or after pos where str is found in strVar strVar.find(str, pos) strVar.find first of (str, pos) Returns the index of the first occurrence of any character of strVar in str. The search starts at pos strVar.find first not of (str, pos) Returns the index of the first occurrence of any character of str not in strVar. The search starts at pos Inserts n occurrences of the character ch at strVar.insert (pos, ch)index pos into strVar; pos and n are of type string::size type; ch is a character Inserts all the characters of str at index pos into strVar strVar.insert (pos, str; Returns a value of type string::size_type giving the number of characters strVar strVar.length () Starting at index pos, replaces the next n characters of strVar with all the characters of str. If n> length of strVar, then all the characters until the end of strVar are replaced strVar.replace (pos, n, str); Returns a string that is a substring of strVar starting at pos. The length of the substring is at most len characters. If len is too large, it means "to the end" of the string in strVar strVar.substr (pos, len) Returns a value of type string::size type giving the number of characters strVar strVar.size () strVar.swap (strl) Swaps the contents of strVar and strl strl is a string variable

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!