Is there any (possibly, using a macros) way to get a substring of a string using python-like expression f(i:j)? Or, more specifically, resolve i:j expression into pair of indices i and j? Any ideas?
EDIT: Yes, I need :. Or ;. Basically, something that simple function or macros can't do. Just want to see if it is possible or not.
EDIT: Basically, I want to see if it is widely applicable. For arrays as well, maybe. So the question is more of a "Can I turn i:j to i j", I guess. Doesn't matter is these are std:strings or c-strings.
iandj? Can you use comma (,)?f[i:j]. Regardless of whether it's possible and/or good, is there are a reason why you want round brackets?std::string?