grand renaming to 'aqua' (well, 'Aqua' actually)
[aqualang.git] / src / builtin.string.cpp
blob195d996aabde841af1543e079ca7d7d2ddaf378b
2 #include "private.h"
3 #include "builtin.h"
5 namespace Aqua
7 using Value = Interpreter::Value;
9 namespace Builtins
11 BUILTIN_PROTO(rtbuiltin_func_string_length, ip, self, args)
13 (void)ip;
14 (void)args;
15 Value::NumberType sz;
16 sz = Value::NumberType(self.string().size());
17 return Value(sz);
20 BUILTIN_PROTO(rtbuiltin_func_string_substr, ip, self, args)
22 (void)ip;
23 (void)self;
24 (void)args;
25 Value::NumberType from;
26 Value::NumberType to;
27 //if(ip.needNumber(args[0], &from) && ip.needNumber(args[1], &to));
28 std::cerr << "<string>.substr: args:" << std::endl;
29 for(size_t i=0; i<args.size(); i++)
31 std::cerr << " [" << i << "] = " << args[i] << std::endl;
33 return Value();