String tokenizing in C++ style