|
|
| version 1.45, 2001/05/07 13:29:47 | version 1.48, 2001/05/11 17:45:10 |
|---|---|
| Line 31 public: // Methoded | Line 31 public: // Methoded |
| // methods | // methods |
| static void _length(Request& r, const String&, MethodParams *) { | static void _length(Request& r, const String& method_name, MethodParams *) { |
| Pool& pool=r.pool(); | Pool& pool=r.pool(); |
| Value& value=*new(pool) VDouble(pool, r.self->get_string()->size()); | Value& result=*new(pool) VDouble(pool, r.self->get_string()->size()); |
| r.write_no_lang(value); | result.set_name(method_name); |
| r.write_no_lang(result); | |
| } | } |
| static void _int(Request& r, const String&, MethodParams *) { | static void _int(Request& r, const String& method_name, MethodParams *) { |
| Pool& pool=r.pool(); | Pool& pool=r.pool(); |
| Value& value=*new(pool) VInt(pool, (int)r.self->as_double()); | Value& result=*new(pool) VInt(pool, r.self->as_int()); |
| r.write_no_lang(value); | result.set_name(method_name); |
| r.write_no_lang(result); | |
| } | } |
| static void _double(Request& r, const String&, MethodParams *) { | static void _double(Request& r, const String& method_name, MethodParams *) { |
| Pool& pool=r.pool(); | Pool& pool=r.pool(); |
| Value& value=*new(pool) VDouble(pool, r.self->as_double()); | Value& result=*new(pool) VDouble(pool, r.self->as_double()); |
| r.write_no_lang(value); | result.set_name(method_name); |
| r.write_no_lang(result); | |
| } | } |
| /*not static*/void _string_format(Request& r, const String& method_name, MethodParams *params) { | /*not static*/void _string_format(Request& r, const String& method_name, MethodParams *params) { |
| Line 181 static void replace_action(Table& table, | Line 184 static void replace_action(Table& table, |
| *ai.dest << *ai.post_match; | *ai.dest << *ai.post_match; |
| } | } |
| /** search/replace | |
| ^string.match[regexp][options] | |
| ^string.match[regexp][options]{replacement-code} | |
| */ | |
| static void _match(Request& r, const String& method_name, MethodParams *params) { | static void _match(Request& r, const String& method_name, MethodParams *params) { |
| Pool& pool=r.pool(); | Pool& pool=r.pool(); |
| const String& src=*static_cast<VString *>(r.self)->get_string(); | const String& src=*static_cast<VString *>(r.self)->get_string(); |