#include #include int main() { std::string label{"West:Gate"}; auto split = label.find(':'); if (split == std::string::npos) { return 1; } std::string zone = label.substr(0, split); std::string stop = label.substr(split + 1); std::cout << zone << " zone, " << stop << " stop\n"; }