J
James Aguilar
Hey all,
Does anyone know how to get an iterator to an arbitrary location in a string (in
constant time)? This is the best I've been to do:
--- CODE ---
std::string::iterator iteratorForIndex(std::string &theString,
int position) {
return &theString[position];
}
--- CODE ---
Is there any more standard way to do it, again, in constant time?
- JFA1
Does anyone know how to get an iterator to an arbitrary location in a string (in
constant time)? This is the best I've been to do:
--- CODE ---
std::string::iterator iteratorForIndex(std::string &theString,
int position) {
return &theString[position];
}
--- CODE ---
Is there any more standard way to do it, again, in constant time?
- JFA1