This preview shows pages 1–3. Sign up to view the full content.
This preview has intentionally blurred sections. Sign up to view the full version.View Full Document
Unformatted text preview: size_type find(const string&, size_type n = 0); string substr(size_type pos = 0, size_type n = npos) Commonly used overloaded operators: ==- contents of strings the same? (also != , < , <= , >= , > ) =- assign a char * , char , or string +=- append a char * , char , or string +- creates and returns a new string related functions: ostream& << string& C++ Lecture 4 http://www.cs.mun.ca/~gstarkes/3710/c++/lecture4.html 2 of 2 4/13/2009 5:28 PM write a string istream& >> string& read a (space delimited) string getline(istream&, string&, char delim='\n') read a line (not including the \n ) [Previous Lecture] [Lecture Index] [Next Lecture] This document was created with Win2PDF available at http://www.win2pdf.com. The unregistered version of Win2PDF is for evaluation or non-commercial use only. This page will not be added after purchasing Win2PDF....
View Full Document
- Spring '09