About Store Forum Documentation Contact



Post Reply 
std::string.assign equivalent?
Author Message
fatcoder Offline
Member

Post: #1
std::string.assign equivalent?
std::string has an assign method that allows you to specify the start character position of another string and a length and it will copy that section of the other string into it, like this.

Code:
std::string otherString = "Hello World!"
std::string newString;
newString.assign(&otherString[6], 5);

newString is now set to "World"

Is there anything like this in EE somewhere? I've looked through the String and String Functions headers but can't find anything like this?
03-13-2014 06:00 AM
Find all posts by this user Quote this message in a reply
Post Reply