src/ds++/XGetopt.cc
std::vector<char> XGetopt::decompose_shortopts(std::string const &shortopts) {
  Require(shortopts.size() > 0);
  std::vector<char> vso;
  for (size_t i = 0; i < shortopts.size(); ++i) {
    vso.push_back(shortopts[i]);
    if (i + 1 < shortopts.size() && shortopts[i + 1] == std::string(":")[0])
      this->vshortopts_hasarg[shortopts[i]] = true;
    else
      this->vshortopts_hasarg[shortopts[i]] = false;
  }
  Ensure(vso.size() > 0 && vso.size() <= shortopts.size());
  return vso;
}
//------------------------------------------------------------------------------------------------//
/*!
 * \brief Convert a string into easy-to-parse vectors and strip colons.
 * \param[in] shortopts A string of character and optional colons. Each character represents one
 *            option that is registered. Characters followed by a colon represent options that
 *            require additional information to be read from the command line.
 * \return A vector of chars that represent all support options.
 *
 * - This function also populates the class member vshortopts_hasarg.
 * - Valid shortopts are single characters or a character followed by a colon.
 */
\brief Convert a string into easy-to-parse vectors and strip colons.
\param[in] shortopts A string of character and optional colons. Each character represents one
option that is registered. Characters followed by a colon represent options that
require additional information to be read from the command line.
\return A vector of chars that represent all support options.

- This function also populates the class member vshortopts_hasarg.
- Valid shortopts are single characters or a character followed by a colon.
\ brief Convert a string into easy - to - parse vectors and strip colons . \ param [ in ] shortopts A string of character and optional colons . Each character represents one option that is registered . Characters followed by a colon represent options that require additional information to be read from the command line . \ return A vector of chars that represent all support options . - This function also populates the class member vshortopts_hasarg . - Valid shortopts are single characters or a character followed by a colon .
std::vector<char> XGetopt::decompose_shortopts(std::string const &shortopts) {
  Require(shortopts.size() > 0);
  std::vector<char> vso;
  for (size_t i = 0; i < shortopts.size(); ++i) {
    vso.push_back(shortopts[i]);
    if (i + 1 < shortopts.size() && shortopts[i + 1] == std::string(":")[0])
      this->vshortopts_hasarg[shortopts[i]] = true;
    else
      this->vshortopts_hasarg[shortopts[i]] = false;
  }
  Ensure(vso.size() > 0 && vso.size() <= shortopts.size());
  return vso;
}
std :: vector < char > XGetopt :: decompose_shortopts ( std :: string const & shortopts ) { Require ( shortopts . size ( ) > 0 ) ; std :: vector < char > vso ; for ( size_t i = 0 ; i < shortopts . size ( ) ; ++ i ) { vso . push_back ( shortopts [ i ] ) ; if ( i + 1 < shortopts . size ( ) && shortopts [ i + 1 ] == std :: string ( " " ) [ 0 ] ) this -> vshortopts_hasarg [ shortopts [ i ] ] = true ; else this -> vshortopts_hasarg [ shortopts [ i ] ] = false ; } Ensure ( vso . size ( ) > 0 && vso . size ( ) <= shortopts . size ( ) ) ; return vso ; }
\brief Convert a string into easy-to-parse vectors and strip colons.
\ brief Convert a string into easy - to - parse vectors and strip colons .