26 #if ! defined (octave_utils_h)
27 #define octave_utils_h 1
29 #include "octave-config.h"
90 const std::string&
get_prefix ()
const {
return m_prefix; }
94 std::string m_replacement_style{
"underscore"};
95 std::string m_prefix{
"x"};
105 extern OCTINTERP_API
bool
108 OCTAVE_DEPRECATED (9,
"octave::same_file is obsolete, use octave::sys::same_file")
109 extern OCTINTERP_API
bool
110 same_file (const std::
string&
f, const std::
string& g);
113 const std::
string& s,
114 int min_match_len = 1,
117 extern OCTINTERP_API
int
119 const std::
string& s,
int min_toks_to_match,
122 extern OCTINTERP_API std::
string
128 extern OCTINTERP_API std::
string
131 extern OCTINTERP_API std::
string
133 const std::
string& file,
134 bool require_regular_file = false);
146 extern OCTINTERP_API
void
149 extern OCTINTERP_API
void
153 extern OCTINTERP_API
void
158 extern OCTINTERP_API
void
165 extern OCTINTERP_API
Matrix
171 extern OCTINTERP_API std::
size_t
174 extern OCTINTERP_API std::
size_t
177 extern OCTINTERP_API std::
string
180 extern OCTINTERP_API std::
string asprintf (const
char *fmt, ...);
182 extern OCTINTERP_API
void sleep (
double seconds,
183 bool do_graphics_events = false);
196 OCTAVE_END_NAMESPACE(
octave)
Vector representing the dimensions (size) of an Array.
Helper class for make_valid_name function calls.
make_valid_name_options()=default
Default options for make_valid_name function calls.
const std::string & get_replacement_style() const
const std::string & get_prefix() const
OCTAVE_BEGIN_NAMESPACE(octave) static octave_value daspk_fcn
F77_RET_T const F77_DBLE const F77_DBLE * f
std::size_t vformat(std::ostream &os, const char *fmt, va_list args)
std::string find_data_file_in_load_path(const std::string &fcn, const std::string &file, bool require_regular_file=false)
std::string asprintf(const char *fmt,...)
std::string do_string_escapes(const std::string &s)
octave_idx_type dims_to_numel(const dim_vector &dims, const octave_value_list &idx)
std::string undo_string_escapes(const std::string &s)
int almost_match(const std::string &std, const std::string &s, int min_match_len=1, int case_sens=1)
std::string file_in_path(const std::string &, const std::string &)
string_vector search_path_for_all_files(const std::string &, const string_vector &)
std::string contents_file_in_path(const std::string &)
int keyword_almost_match(const char *const *std, int *min_len, const std::string &s, int min_toks_to_match, int max_toks)
std::string search_path_for_file(const std::string &, const string_vector &)
Matrix identity_matrix(octave_idx_type nr, octave_idx_type nc)
std::string vasprintf(const char *fmt, va_list args)
void get_dimensions(const octave_value &a, const char *warn_for, dim_vector &dim)
bool valid_identifier(const char *s)
FloatMatrix float_identity_matrix(octave_idx_type nr, octave_idx_type nc)
std::size_t format(std::ostream &os, const char *fmt,...)
bool make_valid_name(std::string &str, const make_valid_name_options &options)
Modify str to be a valid variable name.
const char * undo_string_escape(char c)
std::string fcn_file_in_path(const std::string &)
void sleep(double seconds, bool do_graphics_events=false)
void check_dimensions(dim_vector &dim, const char *warnfor)
octave_value_list do_simple_cellfun(octave_value_list(*fcn)(const octave_value_list &, int), const char *fcn_name, const octave_value_list &args, int nargout)
bool same_file(const std::string &f, const std::string &g)