Beispiel #1
0
void merge_floats(strvec_t const & tokens_in, strvec_t & tokens_out) {
  ptrdiff_t tokcnt = tokens_in.size();
  ptrdiff_t i = 0;
  
  for(; i < tokcnt - 2; ++i) {
    string const & l = tokens_in[i];
    string const & c = tokens_in[i+1];
    string const & r = tokens_in[i+2];

    if(c == "." && l != "" && r != "") {
      tokens_out.push_back(l+c+r);
      i += 2;
    } else
      tokens_out.push_back(l);
  }

  for(;i < tokcnt; ++i) {
    tokens_out.push_back(tokens_in[i]);
  }
}
Beispiel #2
0
 void add_line(const char *str)
 {
   lines.push_back(simpleline_t(str));
 }
Beispiel #3
0
 void add_line(simpleline_t &line)
 {
   lines.push_back(line);
 }