C++ String operator+=()This function is used to extend the string by appending new characters at the end of the string. SyntaxConsider two strings str1 and str2. Syntax would be : Parameterstr2: str2 is a string object which is to be appended. s: s is a pointer to the null terminated sequence of characters. ch: ch is a character which is to be appended to the current value of the string. Return valueIt returns *this. Example 1Let's see a simple example. Output: java programming Example 2Let's see another simple example. Output: 1234 Example 3Let's see a simple example by passing single character value. Output: C++ Example 4Let's see this example. Output: javaTpoint Tutorial
Next TopicC++ Strings
|
JavaTpoint offers too many high quality services. Mail us on h[email protected], to get more information about given services.
JavaTpoint offers college campus training on Core Java, Advance Java, .Net, Android, Hadoop, PHP, Web Technology and Python. Please mail your requirement at [email protected].
Duration: 1 week to 2 week