string& insert ( size_t pos1, const string& str, size_t pos2, size_t n );
string& insert ( size_t pos1, const char* s, size_t n);
string& insert ( size_t pos1, const char* s );
string& insert ( size_t pos1, size_t n, char c );
iterator insert ( iterator p, char c );
void insert ( iterator p, size_t n, char c );
template<class InputIterator>
void insert ( iterator p, InputIterator first, InputIterator last );
Insert into string
The current string content is extended by inserting some additional content at a specific location within the string content (this position is determined by either pos1 or p, depending on the function version used).
The arguments passed to the function determine the content that is inserted:
keep me in your prayers
string& insert ( size_t pos1, const string& str );
Inserts a copy of the entire string object str at character position pos1.string& insert ( size_t pos1, const string& str, size_t pos2, size_t n );
Inserts a copy of a substring of str at character position pos1. The substring is the portion of str that begins at the character position pos2 and takes up to n characters (it takes less than n if the end of str is reached before).
string& insert ( size_t pos1, const char * s, size_t n );
Inserts at the character position pos1, a copy of the string formed by the first n characters in the array of characters pointed by s.
string& insert ( size_t pos1, const char * s );
Inserts at character position pos1, a copy of the string formed by the null-terminated character sequence (C string) pointed by s. The length of this character sequence is determined by the first ocurrence of a null character (as determined by traits.length(s)).
string& insert ( size_t pos1, size_t n, char c );
Inserts a string formed by a repetition of character c, n times, at the character position pos1.
iterator insert ( iterator p, char c );
Inserts a copy of character c at the position referred by iterator p and returns an iterator referring to this position where it has been inserted.
void insert ( iterator p, size_t n, char c );
Inserts a string formed by the repetition of character c, n times, at the position referred by iterator p.
template<class InputIterator> void insert (iterator p, InputIterator first, InputIterator last);
Inserts at the internal position referred by p the content made up of the characters that go from the element referred by iterator first to the element right before the one referred by iterator last.
--
M.Waqas
waqasijaz007@yahoo.com
--
Join us at facebook: https://www.facebook.com/VU.Study.Corner
Group Link: http://groups.google.com/group/VU-Study-Corner?hl=en
Group Rules: http://groups.google.com/group/VU-Study-Corner/web/group-rules
Unsubscribe: VU-Study-Corner+unsubscribe@googlegroups.com
Adult contents, Spamming, Immoral & Rudish talk, Cell number, Websites & Groups links specially in paper days are strictly prohibited and banned in group.
No comments:
Post a Comment