C++, boost: which is fastest way to parse string like tcp://adr:port/ into address string and one int for port?

后端 未结 5 2285
南旧
南旧 2020-12-22 01:31

we have std::string A with tcp://adr:port/ How to parse it into address std::string and one int for port?

5条回答
  •  青春惊慌失措
    2020-12-22 02:26

    You could use a tool like re2c to create a fast custom scanner. I'm also unclear on what you consider to be "fastest" -- for the processor or development time or both?

提交回复
热议问题