|
| Function_substr () |
|
const mup::char_type * | GetDesc () const final |
|
mup::IToken * | Clone () const final |
|
void | Eval (mup::ptr_val_type &ret, const mup::ptr_val_type *args, int argc) final |
|
Definition at line 85 of file ExpressionParser.cpp.
import_export::anonymous_namespace{ExpressionParser.cpp}::Function_substr::Function_substr |
( |
| ) |
|
|
inline |
mup::IToken* import_export::anonymous_namespace{ExpressionParser.cpp}::Function_substr::Clone |
( |
| ) |
const |
|
inlinefinal |
void import_export::anonymous_namespace{ExpressionParser.cpp}::Function_substr::Eval |
( |
mup::ptr_val_type & |
ret, |
|
|
const mup::ptr_val_type * |
args, |
|
|
int |
argc |
|
) |
| |
|
inlinefinal |
Definition at line 92 of file ExpressionParser.cpp.
References run_benchmark_import::args, THROW_INVALID_PARAMETER, THROW_INVALID_PARAMETER_COUNT, and VALIDATE_ARG_TYPE.
93 if (argc < 2 || argc > 3) {
101 auto const text =
args[0]->GetString();
102 auto const start =
args[1]->GetInteger();
107 if (start > static_cast<int>(text.length())) {
110 *ret = text.substr(start - 1, std::string::npos);
112 auto const count =
args[2]->GetInteger();
115 }
else if ((start - 1) + count > static_cast<int>(text.length())) {
118 *ret = text.substr(start - 1, count);
#define VALIDATE_ARG_TYPE(arg, t2)
#define THROW_INVALID_PARAMETER_COUNT()
#define THROW_INVALID_PARAMETER(arg, what)
const mup::char_type* import_export::anonymous_namespace{ExpressionParser.cpp}::Function_substr::GetDesc |
( |
| ) |
const |
|
inlinefinal |
The documentation for this class was generated from the following file: