convert between std::string and int