|
|
| version 1.324, 2016/09/08 19:28:34 | version 1.327, 2016/09/21 00:04:05 |
|---|---|
| Line 121 struct TableControlChars { | Line 121 struct TableControlChars { |
| if(sencloser->is_empty()){ | if(sencloser->is_empty()){ |
| encloser=0; | encloser=0; |
| } else { | } else { |
| if(sencloser->length()!=1) | if(sencloser->length()!=1) |
| throw Exception(PARSER_RUNTIME, sencloser, "encloser must be one byte character"); | throw Exception(PARSER_RUNTIME, sencloser, "encloser must be empty or one byte character"); |
| encloser=sencloser->first_char(); | encloser=sencloser->first_char(); |
| } | } |
| result++; | result++; |
| } | } |
| Line 171 public: | Line 171 public: |
| inline lsplit_sresult lsplit(char* *string_ref, const char* delims, StringSplitHelper& helper) { | inline lsplit_sresult lsplit(char* *string_ref, const char* delims, StringSplitHelper& helper) { |
| lsplit_sresult result; | lsplit_sresult result; |
| if(char *pos=*string_ref) { | if(char *pos=*string_ref) { |
| while(char* v=strpbrk(pos, delims)) { | while(pos=strpbrk(pos, delims)) { |
| if(helper.check_lang(v)){ | if(helper.check_lang(pos)){ |
| result.delim=*v; | result.delim=*pos; |
| *v=0; | *pos=0; |
| result.piece=helper.extract(*string_ref); | result.piece=helper.extract(*string_ref); |
| *string_ref=v+1; | *string_ref=pos+1; |
| return result; | return result; |
| } | } |
| pos=v+1; | pos++; |
| } | } |
| result.piece=helper.extract(*string_ref); | result.piece=helper.extract(*string_ref); |
| *string_ref=0; | *string_ref=0; |
| Line 208 static lsplit_sresult lsplit(char** stri | Line 208 static lsplit_sresult lsplit(char** stri |
| } | } |
| } | } |
| pos=v+1; | pos=v+1; |
| }{ | } else { |
| result.append(helper.extract(*string_ref)); | result.append(helper.extract(*string_ref)); |
| *string_ref=0; | *string_ref=0; |
| return result; | return result; |
| Line 1220 inline Table::element_type row_from_stri | Line 1220 inline Table::element_type row_from_stri |
| // parse cells | // parse cells |
| Table::element_type row=new ArrayString; | Table::element_type row=new ArrayString; |
| size_t pos_after=0; | string.split(*row, 0, "\t", String::L_AS_IS); |
| string.split(*row, pos_after, "\t", String::L_AS_IS); | |
| return row; | return row; |
| } | } |