Diff for /parser3/src/classes/string.C between versions 1.235 and 1.237

version 1.235, 2017/05/17 14:22:11 version 1.237, 2018/01/19 16:47:35
Line 381  static void _match(Request& r, MethodPar Line 381  static void _match(Request& r, MethodPar
   
         if(Value* value=regexp.as(VREGEX_TYPE)){          if(Value* value=regexp.as(VREGEX_TYPE)){
                 if(options && options->is_defined())                  if(options && options->is_defined())
                         throw Exception(PARSER_RUNTIME,                          throw Exception(PARSER_RUNTIME, 0, "you can not specify regex-object and options together");
                                 0,  
                                 "you can not specify regex-object and options together"  
                         );  
                 vregex=static_cast<VRegex*>(value);                  vregex=static_cast<VRegex*>(value);
         } else {          } else {
                 vregex=new VRegex(r.charsets.source(),                  vregex=new VRegex(r.charsets.source(), &regexp.as_string(), (options) ? (&options->as_string()) : 0);
                         &regexp.as_string(),  
                         (options)?(&options->as_string()):0);  
                 vregex->study();                  vregex->study();
                 vrcleaner.vregex=vregex;                  vrcleaner.vregex=vregex;
         }          }
Line 398  static void _match(Request& r, MethodPar Line 393  static void _match(Request& r, MethodPar
         int matches_count=0;          int matches_count=0;
   
         if(params_count<3) { // search          if(params_count<3) { // search
                 Table* table=src.match(vregex,                  Table* table=src.match(vregex, search_action, 0, matches_count);
                         search_action, 0,  
                         matches_count);  
   
                 if(table){                  if(table){
                         r.write(*new VTable(table));                          r.write(*new VTable(table));
Line 826  MString::MString(): Methoded("string") { Line 819  MString::MString(): Methoded("string") {
         // ^string.split[delim][options]          // ^string.split[delim][options]
         // ^string.split[delim][options][column name]          // ^string.split[delim][options][column name]
         add_native_method("split", Method::CT_DYNAMIC, _split, 1, 3);          add_native_method("split", Method::CT_DYNAMIC, _split, 1, 3);
                 // old names for backward compatibility          // old names for backward compatibility
                 // ^string.lsplit[delim]          // ^string.lsplit[delim]
                 add_native_method("lsplit", Method::CT_DYNAMIC, _lsplit, 1, 1);          add_native_method("lsplit", Method::CT_DYNAMIC, _lsplit, 1, 1);
                 // ^string.rsplit[delim]          // ^string.rsplit[delim]
                 add_native_method("rsplit", Method::CT_DYNAMIC, _rsplit, 1, 1);          add_native_method("rsplit", Method::CT_DYNAMIC, _rsplit, 1, 1);
           
         // ^string.match[regexp][options]          // ^string.match[regexp][options]
         // ^string.match[regexp][options]{replacement-code}          // ^string.match[regexp][options]{replacement-code}
         // ^string.match[regexp][options]{replacement-code}{code-if-nothing-is-found}          // ^string.match[regexp][options]{replacement-code}{code-if-nothing-is-found}

Removed from v.1.235  
changed lines
  Added in v.1.237


E-mail: