is there any "end" character for an std::string?
No. It is possible to define a std::string that is not null terminated. You won't be able to do a few things for such strings, such as treat the return value of std::string:data() as a null terminated C string 1, but a std::string can be constructed that way.
Can I make the end iterator point to the current character somehow?
To get a std::string::iterator point to a certain character, you'll have to traverse the string.
E.g.
std::string str = "This is a string"; auto iter = str.begin(); auto end = iter; while ( end != str.end() && *end != 'r' ) ++end;
After that, the range defined by iter and end contains the string "This is a st".
If that is not acceptable, you'll have to adapt your code to check the value of the character for every step.
std::string str = "This is a string"; auto iter = str.begin(); // Break when 'r' is encountered or end of string is reached. while ( iter != str.end() && *iter != 'r' ) { // Use *iter ... }
1 Thanks are due to @Cubbi for pointing out an error in what I stated. std::string::data() can return a char const* that is not null terminated if using a version of C++ earlier than C++11. If using C++11 or later, std::string::data() is required to return a null terminated char const*.
std::advance(str.begin(), n)and use that as the end.freeis called on the first character's address. This may or may not be important for your current problem.