Loading...
Searching...
No Matches
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

  str | the string to be split
  delim | the 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_error | if the delimiter is not found in the original string