src/state.cpp
// converts a state into a string.
converts a state into a string.
converts a state into a string .
void state2string(State &sta, std::string &str) {
  char bases[4] = {'a', 'c', 'g', 't'};
  int i;
  if (sta.nalpha == 4) {
    str.resize(0);
    for (i=0; i < sta.len; i++) {
      str.push_back(bases[sta.s[i]]);
    }
  } else {
    throw std::out_of_range("Can't convert a state with more than 4 letters to a string." );
  }
}
void state2string ( State & sta , std :: string & str ) { char bases [ 4 ] = { ' ' , ' ' , ' ' , ' ' } ; int i ; if ( sta . nalpha == 4 ) { str . resize ( 0 ) ; for ( i = 0 ; i < sta . len ; i ++ ) { str . push_back ( bases [ sta . s [ i ] ] ) ; } } else { throw std :: out_of_range ( " " ) ; } }
converts a state into a string.
converts a state into a string .