Branch: Tag:

2014-12-04

2014-12-04 19:23:36 by Arne Goedeke <el@laramies.com>

use string range information to optimize replace

2216:    ONERROR mojt_uwp;    replace_searchfunc f = (replace_searchfunc)0;    -  if(!str->len) +  if(!str->len || !string_range_contains_string(str, del))    { -  add_ref(empty_pike_string); -  return empty_pike_string; +  add_ref(str); +  return str;    }       shift=MAXIMUM(str->size_shift,to->size_shift);