|
|
| version 1.134, 2004/02/27 15:24:03 | version 1.135, 2004/03/01 08:52:24 |
|---|---|
| Line 503 static void _trim(Request& r, MethodPara | Line 503 static void _trim(Request& r, MethodPara |
| String::Trim_kind kind=String::TRIM_BOTH; | String::Trim_kind kind=String::TRIM_BOTH; |
| const char* chars=0; | const char* chars=0; |
| if(params.count()>0) { | if(params.count()>0) { |
| if(params.count()>1) { // [>>kind<<;chars] | const String& skind=params.as_string(0, |
| const String& skind=params.as_string(0, | "'where' must be string"); |
| "'where' must be string"); | if(skind==TRIM_START_OPTION) |
| if(skind==TRIM_START_OPTION) | kind=String::TRIM_START; |
| kind=String::TRIM_START; | else if(skind==TRIM_END_OPTION) |
| else if(skind==TRIM_END_OPTION) | kind=String::TRIM_END; |
| kind=String::TRIM_END; | else if(skind==TRIM_BOTH_OPTION) |
| else if(skind==TRIM_BOTH_OPTION) | kind=String::TRIM_BOTH; |
| kind=String::TRIM_BOTH; | else |
| else | throw Exception("parser.runtime", |
| throw Exception("parser.runtime", | &skind, |
| &skind, | "'kind' should be one of "TRIM_START_OPTION", "TRIM_BOTH_OPTION", "TRIM_END_OPTION); |
| "'kind' should be one of "TRIM_START_OPTION", "TRIM_BOTH_OPTION", "TRIM_END_OPTION); | |
| } | |
| chars=params.as_string(params.count()-1, | if(params.count()>1) |
| chars=params.as_string(1, | |
| "'chars' must be string").cstr(); | "'chars' must be string").cstr(); |
| } | } |