Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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

image text in transcribedimage text in transcribedI 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

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

Current Trends In Database Technology Edbt 2006 Edbt 2006 Workshops Phd Datax Iidb Iiha Icsnw Qlqp Pim Parma And Reactivity On The Web Munich Germany March 2006 Revised Selected Papers Lncs 4254

Authors: Torsten Grust ,Hagen Hopfner ,Arantza Illarramendi ,Stefan Jablonski ,Marco Mesiti ,Sascha Muller ,Paula-Lavinia Patranjan ,Kai-Uwe Sattler ,Myra Spiliopoulou ,Jef Wijsen

2006th Edition

3540467882, 978-3540467885

More Books

Students also viewed these Databases questions