26 #if ! defined (octave_utils_h)
27 #define octave_utils_h 1
29 #include "octave-config.h"
88 const std::string&
get_prefix ()
const {
return m_prefix; }
92 std::string m_replacement_style{
"underscore"};
93 std::string m_prefix{
"x"};
103 extern OCTINTERP_API
bool
106 extern OCTINTERP_API
bool
107 same_file (
const std::string&
f,
const std::string& g);
109 extern OCTINTERP_API
int almost_match (
const std::string& std,
110 const std::string& s,
111 int min_match_len = 1,
114 extern OCTINTERP_API
int
116 const std::string& s,
int min_toks_to_match,
119 extern OCTINTERP_API std::string
125 extern OCTINTERP_API std::string
128 extern OCTINTERP_API std::string
130 const std::string& file,
131 bool require_regular_file =
false);
143 extern OCTINTERP_API
void
146 extern OCTINTERP_API
void
150 extern OCTINTERP_API
void
155 extern OCTINTERP_API
void
162 extern OCTINTERP_API
Matrix
168 extern OCTINTERP_API std::size_t
169 format (std::ostream& os,
const char *fmt, ...);
171 extern OCTINTERP_API std::size_t
172 vformat (std::ostream& os,
const char *fmt, va_list args);
174 extern OCTINTERP_API std::string
175 vasprintf (
const char *fmt, va_list args);
177 extern OCTINTERP_API std::string
asprintf (
const char *fmt, ...);
179 extern OCTINTERP_API
void sleep (
double seconds,
180 bool do_graphics_events =
false);
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
OCTINTERP_API std::string file_in_path(const std::string &, const std::string &)
OCTINTERP_API std::string vasprintf(const char *fmt, va_list args)
OCTINTERP_API int keyword_almost_match(const char *const *std, int *min_len, const std::string &s, int min_toks_to_match, int max_toks)
OCTINTERP_API string_vector search_path_for_all_files(const std::string &, const string_vector &)
OCTINTERP_API int almost_match(const std::string &std, const std::string &s, int min_match_len=1, int case_sens=1)
OCTINTERP_API std::size_t vformat(std::ostream &os, const char *fmt, va_list args)
OCTINTERP_API void sleep(double seconds, bool do_graphics_events=false)
OCTINTERP_API std::string undo_string_escapes(const std::string &s)
OCTINTERP_API std::string find_data_file_in_load_path(const std::string &fcn, const std::string &file, bool require_regular_file=false)
OCTINTERP_API bool valid_identifier(const char *s)
OCTINTERP_API FloatMatrix float_identity_matrix(octave_idx_type nr, octave_idx_type nc)
OCTINTERP_API bool same_file(const std::string &f, const std::string &g)
OCTINTERP_API Matrix identity_matrix(octave_idx_type nr, octave_idx_type nc)
OCTINTERP_API void get_dimensions(const octave_value &a, const char *warn_for, dim_vector &dim)
OCTINTERP_API std::string fcn_file_in_path(const std::string &)
OCTINTERP_API std::string search_path_for_file(const std::string &, const string_vector &)
OCTINTERP_API void check_dimensions(dim_vector &dim, const char *warnfor)
OCTINTERP_API std::string contents_file_in_path(const std::string &)
OCTINTERP_API std::string asprintf(const char *fmt,...)
OCTINTERP_API std::size_t format(std::ostream &os, const char *fmt,...)
OCTINTERP_API bool make_valid_name(std::string &str, const make_valid_name_options &options)
Modify str to be a valid variable name.
OCTINTERP_API 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)
OCTINTERP_API octave_idx_type dims_to_numel(const dim_vector &dims, const octave_value_list &idx)
OCTINTERP_API const char * undo_string_escape(char c)
OCTINTERP_API std::string do_string_escapes(const std::string &s)