/[pcre]/code/trunk/pcrecpp.cc
ViewVC logotype

Diff of /code/trunk/pcrecpp.cc

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 594 by ph10, Sun May 1 08:22:12 2011 UTC revision 881 by ph10, Sun Jan 15 18:07:05 2012 UTC
# Line 384  int RE::GlobalReplace(const StringPiece& Line 384  int RE::GlobalReplace(const StringPiece&
384    int vec[kVecSize];    int vec[kVecSize];
385    string out;    string out;
386    int start = 0;    int start = 0;
   int lastend = -1;  
387    bool last_match_was_empty_string = false;    bool last_match_was_empty_string = false;
388    
389    while (start <= static_cast<int>(str->length())) {    while (start <= static_cast<int>(str->length())) {
# Line 440  int RE::GlobalReplace(const StringPiece& Line 439  int RE::GlobalReplace(const StringPiece&
439      out.append(*str, start, matchstart - start);      out.append(*str, start, matchstart - start);
440      Rewrite(&out, rewrite, *str, vec, matches);      Rewrite(&out, rewrite, *str, vec, matches);
441      start = matchend;      start = matchend;
     lastend = matchend;  
442      count++;      count++;
443      last_match_was_empty_string = (matchstart == matchend);      last_match_was_empty_string = (matchstart == matchend);
444    }    }

Legend:
Removed from v.594  
changed lines
  Added in v.881

  ViewVC Help
Powered by ViewVC 1.1.5