src/Matrix/row_vector.cc
string row_vector::trim_right (const string& in)
{
  int n = 0;
  string::const_reverse_iterator p = in.rbegin();

  while (p != in.rend()) {
    if (isspace (*p))
      n++;
    else
      break;
    p++;
  }
  string out (in, 0, in.length() - n);
  return out;
}
/**
 * trim_right - trim all whitespace from right side of a string
 * @in: string to be processed. This string is not modified; a
 * modified copy of the string is returned instead.
 */
trim all whitespace from right side of a string
@in: string to be processed. This string is not modified; a
modified copy of the string is returned instead.
trim all whitespace from right side of a string @in : string to be processed . This string is not modified ; a modified copy of the string is returned instead .
string row_vector::trim_right (const string& in)
{
  int n = 0;
  string::const_reverse_iterator p = in.rbegin();
  while (p != in.rend()) {
    if (isspace (*p))
      n++;
    else
      break;
    p++;
  }
  string out (in, 0, in.length() - n);
  return out;
}
string row_vector :: trim_right ( const string & in ) { int n = 0 ; string :: const_reverse_iterator p = in . rbegin ( ) ; while ( p != in . rend ( ) ) { if ( isspace ( * p ) ) n ++ ; else break ; p ++ ; } string out ( in , 0 , in . length ( ) - n ) ; return out ; }
trim_right - trim all whitespace from right side of a string
 @in: string to be processed.
trim_right - trim all whitespace from right side of a string @in : string to be processed .