USRP Hardware Driver and USRP Manual  Version: 4.6.0.0
UHD and USRP Manual
uhd::string Namespace Reference

Functions

UHD_API std::pair< std::string, std::string > split (const std::string &str, const std::string &delim)
 

Function Documentation

◆ split()

UHD_API std::pair<std::string, std::string> uhd::string::split ( const std::string &  str,
const std::string &  delim 
)

Split a string using a delimiter. The delimiter must be a substring of the original string.

Parameters
strthe string to be split
delimthe delimiter in str used to determine the position of the split
Returns
a pair of substrings containing the characters before the first instance of the delimiter and after the first instance of the delimiter
Exceptions
uhd::runtime_errorif the delimiter is not found in the original string