Helper class for make_valid_name
function calls.
More...
#include "utils.h"
Public Member Functions | |
make_valid_name_options ()=default | |
Default options for make_valid_name function calls. More... | |
make_valid_name_options (const octave_value_list &args) | |
Extract attribute-value-pairs from an octave_value_list of strings. More... | |
const std::string & | get_prefix () const |
const std::string & | get_replacement_style () const |
Private Attributes | |
std::string | m_prefix {"x"} |
std::string | m_replacement_style {"underscore"} |
Helper class for make_valid_name
function calls.
Extracting options separately for multiple (e.g. 1000+) function calls avoids expensive repetitive parsing of the very same options.
|
default |
Default options for make_valid_name
function calls.
Calling the constructor without arguments is equivalent to:
make_valid_name_options::make_valid_name_options | ( | const octave_value_list & | args | ) |
Extract attribute-value-pairs from an octave_value_list of strings.
If attributes occur multiple times, the rightmost pair is chosen.
Definition at line 207 of file utils.cc.
References error(), iskeyword(), octave_value_list::length(), m_prefix, m_replacement_style, transform(), and valid_identifier().
|
inline |
help matlab.lang.makeValidName
. Definition at line 88 of file utils.h.
Referenced by make_valid_name().
|
inline |
help matlab.lang.makeValidName
. Definition at line 84 of file utils.h.
Referenced by make_valid_name().
|
private |
Definition at line 93 of file utils.h.
Referenced by make_valid_name_options().
|
private |
Definition at line 92 of file utils.h.
Referenced by make_valid_name_options().