The assign() Function

◀ The insert() Function▶ The replace() Function
Amazon There exist assign() function that allows you to assign a string, a substring, or a succession of identical characters to a string.

However, you can use assignment operators or append() functions for the same purpose. I personally never used assign() but it’s still good to know that such function exists!

Next let’s look at how to replace a portion of a string with another string!
◀ The insert() Function▶ The replace() Function

fShare
Questions? Let me know!
Close