|
|
| version 1.177, 2009/04/24 06:32:06 | version 1.178, 2009/04/28 04:53:52 |
|---|---|
| Line 303 static void split_with_options(Request& | Line 303 static void split_with_options(Request& |
| const String* column_name=0; | const String* column_name=0; |
| if(params_count>2){ | if(params_count>2){ |
| column_name=¶ms.as_string(2, COLUMN_NAME_MUST_BE_STRING); | column_name=¶ms.as_string(2, COLUMN_NAME_MUST_BE_STRING); |
| if (horizontal && column_name->length()) | if (horizontal && !column_name->is_empty()) |
| throw Exception(PARSER_RUNTIME, | throw Exception(PARSER_RUNTIME, |
| column_name, | column_name, |
| "column name can't be specified with horisontal split"); | "column name can't be specified with horisontal split"); |
| } | } |
| if(!column_name || !column_name->length()) | if(!column_name || column_name->is_empty()) |
| column_name=new String("piece"); | column_name=new String("piece"); |
| Table& table=horizontal?split_horizontal(pieces, right):split_vertical(pieces, right, column_name); | Table& table=horizontal?split_horizontal(pieces, right):split_vertical(pieces, right, column_name); |
| Line 625 static void _trim(Request& r, MethodPara | Line 625 static void _trim(Request& r, MethodPara |
| const char* chars=0; | const char* chars=0; |
| if(params_count>0) { | if(params_count>0) { |
| const String& skind=params.as_string(0, "'where' must be string"); | const String& skind=params.as_string(0, "'where' must be string"); |
| if(skind.length()) | if(!skind.is_empty()) |
| if(skind==TRIM_BOTH_OPTION) | if(skind==TRIM_BOTH_OPTION) |
| kind=String::TRIM_BOTH; | kind=String::TRIM_BOTH; |
| else if(skind==TRIM_START_OPTION || skind=="start") | else if(skind==TRIM_START_OPTION || skind=="start") |
| Line 639 static void _trim(Request& r, MethodPara | Line 639 static void _trim(Request& r, MethodPara |
| if(params_count>1) { | if(params_count>1) { |
| const String& schars=params.as_string(1, "'chars' must be string"); | const String& schars=params.as_string(1, "'chars' must be string"); |
| if(schars.length()) | if(!schars.is_empty()) |
| chars=schars.cstr(); | chars=schars.cstr(); |
| } | } |
| } | } |