|
|
| version 1.161, 2008/07/03 09:17:57 | version 1.162, 2008/07/04 11:16:51 |
|---|---|
| Line 36 DECLARE_CLASS_VAR(string, new MString, 0 | Line 36 DECLARE_CLASS_VAR(string, new MString, 0 |
| // defines for statics | // defines for statics |
| #define MATCH_VAR_NAME "match" | #define MATCH_VAR_NAME "match" |
| #define TRIM_START_OPTION "start" | #define TRIM_START_OPTION "left" |
| #define TRIM_END_OPTION "right" | |
| #define TRIM_BOTH_OPTION "both" | #define TRIM_BOTH_OPTION "both" |
| #define TRIM_END_OPTION "end" | |
| // statics | // statics |
| Line 594 static void _trim(Request& r, MethodPara | Line 594 static void _trim(Request& r, MethodPara |
| const String& skind=params.as_string(0, | const String& skind=params.as_string(0, |
| "'where' must be string"); | "'where' must be string"); |
| if(skind.length()) | if(skind.length()) |
| if(skind==TRIM_START_OPTION) | if(skind==TRIM_BOTH_OPTION) |
| kind=String::TRIM_BOTH; | |
| else if(skind==TRIM_START_OPTION || skind=="start") | |
| kind=String::TRIM_START; | kind=String::TRIM_START; |
| else if(skind==TRIM_END_OPTION) | else if(skind==TRIM_END_OPTION || skind=="end") |
| kind=String::TRIM_END; | kind=String::TRIM_END; |
| else if(skind==TRIM_BOTH_OPTION) | |
| kind=String::TRIM_BOTH; | |
| else | else |
| throw Exception(PARSER_RUNTIME, | throw Exception(PARSER_RUNTIME, |
| &skind, | &skind, |