#include "oct-string.h"
#include <algorithm>
#include <cctype>
#include <cstring>
#include <iomanip>
#include <string>
#include "Array.h"
#include "lo-ieee.h"
#include "lo-mappers.h"
#include "uniconv-wrappers.h"
#include "unistr-wrappers.h"
#include "unwind-prot.h"
Go to the source code of this file.
Macros | |
#define | INSTANTIATE_OCTAVE_STRING(T) |
Functions | |
static std::istringstream & | extract_num (std::istringstream &is, double &num, bool &imag, bool &have_sign) |
static bool | is_imag_unit (int c) |
template<> | |
octave_idx_type | numel (const Array< char > &str) |
template<typename T > | |
T::size_type | numel (const T &str) |
template bool | octave::string::strcmp< std::string > (const std::string &, const std::string &) |
template bool | octave::string::strcmp< std::string > (const std::string &, const typename std::string ::value_type *) |
template bool | octave::string::strcmpi< std::string > (const std::string &, const std::string &) |
template bool | octave::string::strcmpi< std::string > (const std::string &, const typename std::string ::value_type *) |
template bool | octave::string::strncmp< std::string > (const std::string &, const std::string &, const typename std::string ::size_type) |
template bool | octave::string::strncmp< std::string > (const std::string &, const typename std::string ::value_type *, const typename std::string ::size_type) |
template bool | octave::string::strncmpi< std::string > (const std::string &, const std::string &, const typename std::string ::size_type n) |
template bool | octave::string::strncmpi< std::string > (const std::string &, const typename std::string ::value_type *, const typename std::string ::size_type) |
template<typename T > | |
std::string | rational_approx (T val, int len) |
template std::string | rational_approx< double > (double val, int len) |
template std::string | rational_approx< float > (float val, int len) |
static void | set_component (Complex &c, double num, bool imag) |
static double | single_num (std::istringstream &is) |
template<> | |
bool | sizes_cmp (const Array< char > &str_a, const Array< char > &str_b) |
template<> | |
bool | sizes_cmp (const Array< char > &str_a, const char *str_b) |
template<typename T > | |
bool | sizes_cmp (const T &str_a, const T &str_b) |
template<typename T > | |
bool | sizes_cmp (const T &str_a, const typename T::value_type *str_b) |
template<typename T > | |
static bool | str_data_cmp (const typename T::value_type *a, const typename T::value_type *b, const typename T::size_type n) |
template<typename T > | |
static bool | str_data_cmpi (const typename T::value_type *a, const typename T::value_type *b, const typename T::size_type n) |
template<typename T > | |
T::size_type | strlen (const typename T::value_type *str) |
#define INSTANTIATE_OCTAVE_STRING | ( | T | ) |
Definition at line 213 of file oct-string.cc.
|
static |
Definition at line 299 of file oct-string.cc.
References imag(), is_imag_unit(), and single_num().
Referenced by octave::string::str2double().
|
inlinestatic |
Definition at line 239 of file oct-string.cc.
Referenced by extract_num().
octave_idx_type numel | ( | const Array< char > & | str | ) |
Definition at line 78 of file oct-string.cc.
References Array< T >::numel().
T::size_type numel | ( | const T & | str | ) |
Definition at line 71 of file oct-string.cc.
Referenced by intNDArray< T >::abs(), all_scalar_1x1(), intNDArray< T >::any_element_not_one_or_zero(), Array< T >::as_column(), dim_vector::as_column(), octave_uint64_matrix::as_mxArray(), Array< T >::as_row(), dim_vector::as_row(), Array< T >::assign(), Sparse< T >::assign(), octave_uint64_matrix::bool_array_value(), octave_lazy_index::byte_size(), Array< T >::byte_size(), MArray< double >::changesign(), octave_bool_matrix::char_array_value(), octave_uint64_matrix::char_array_value(), Sparse< T >::checkelem(), Range::cols(), Range::columns(), octave::textscan_format_list::current(), Array< T >::delete_elements(), Sparse< T >::delete_elements(), Array< T >::diag(), octave::do_simple_cellfun(), string_vector::empty(), Fbitshift(), Fgmtime(), Array< T >::fill(), Array< T >::find(), octave_base_diag< DMT, MT >::float_value(), Flocaltime(), Fquit(), MArray< T >::idx_add(), MArray< T >::idx_min(), img_float2uint(), ind2sub(), Sparse< T >::index(), Array< T >::index(), octave_base_diag< DMT, MT >::is_true(), Array< T >::isempty(), DiagArray2< T >::isempty(), Range::isempty(), Array< T >::issorted(), octave_map::length(), Array< T >::lookup(), Array< T >::map(), string_vector::max_length(), octave::textscan_format_list::next(), octave_lazy_index::nnz(), Array< T >::nnz(), Array< T >::nth_element(), intNDArray< T >::operator!(), Array< T >::resize1(), intNDArray< T >::signum(), octave::string::strcmp(), octave::string::strcmpi(), octave::string::strncmp(), octave::string::strncmpi(), Array< T >::test(), octave::jit_operation::to_idx(), and octave::set_path_model::update_data().
template bool octave::string::strcmp< std::string > | ( | const std::string & | , |
const std::string & | |||
) |
template bool octave::string::strcmp< std::string > | ( | const std::string & | , |
const typename std::string ::value_type * | |||
) |
template bool octave::string::strcmpi< std::string > | ( | const std::string & | , |
const std::string & | |||
) |
template bool octave::string::strcmpi< std::string > | ( | const std::string & | , |
const typename std::string ::value_type * | |||
) |
template bool octave::string::strncmp< std::string > | ( | const std::string & | , |
const std::string & | , | ||
const typename std::string ::size_type | |||
) |
template bool octave::string::strncmp< std::string > | ( | const std::string & | , |
const typename std::string ::value_type * | , | ||
const typename std::string ::size_type | |||
) |
template bool octave::string::strncmpi< std::string > | ( | const std::string & | , |
const std::string & | , | ||
const typename std::string ::size_type | n | ||
) |
template bool octave::string::strncmpi< std::string > | ( | const std::string & | , |
const typename std::string ::value_type * | , | ||
const typename std::string ::size_type | |||
) |
std::string rational_approx | ( | T | val, |
int | len | ||
) |
Definition at line 612 of file oct-string.cc.
References abs(), d, octave::math::isinf(), octave::math::isnan(), len, m, max(), min(), n, octave::math::round(), and octave::math::x_nint().
Referenced by QtHandles::qStringValueFor().
template std::string rational_approx< double > | ( | double | val, |
int | len | ||
) |
template std::string rational_approx< float > | ( | float | val, |
int | len | ||
) |
|
inlinestatic |
Definition at line 439 of file oct-string.cc.
References imag().
Referenced by octave::string::str2double().
|
static |
Definition at line 243 of file oct-string.cc.
References Inf, NaN, and octave_NA.
Referenced by extract_num().
Definition at line 99 of file oct-string.cc.
References Array< T >::dims().
bool sizes_cmp | ( | const Array< char > & | str_a, |
const char * | str_b | ||
) |
Definition at line 113 of file oct-string.cc.
References Array< T >::isvector(), Array< T >::numel(), Array< T >::rows(), and strlen().
bool sizes_cmp | ( | const T & | str_a, |
const T & | str_b | ||
) |
Definition at line 92 of file oct-string.cc.
Referenced by octave::string::strcmp(), and octave::string::strcmpi().
bool sizes_cmp | ( | const T & | str_a, |
const typename T::value_type * | str_b | ||
) |
Definition at line 106 of file oct-string.cc.
|
static |
Definition at line 47 of file oct-string.cc.
References n.
|
static |
Definition at line 58 of file oct-string.cc.
References n.
T::size_type strlen | ( | const typename T::value_type * | str | ) |
Definition at line 85 of file oct-string.cc.
Referenced by charNDArray::charNDArray(), mxArray_number::mxArray_number(), octave::sys::canonicalize_file_name(), KeyboardTranslatorManager::defaultTranslator(), extract_keyword(), F77_FUNC(), TerminalView::fontChange(), handle_message(), octave::base_lexer::handle_number(), charMatrix::insert(), main(), max_str_len(), mexErrMsgIdAndTxt(), mexErrMsgTxt(), mexWarnMsgIdAndTxt(), mexWarnMsgTxt(), octave__scan_string(), octave_async_system_wrapper(), octave_fgets(), octave_getcwd_wrapper(), octave_tex__scan_string(), gzfilebuf::open_mode(), Vt102Emulation::sendString(), mxArray_matlab::set_class_name(), sizes_cmp(), strsave(), mxArray::strsave(), u8_to_wchar(), KeyboardTranslator::Entry::unescape(), valid_key(), and octave::error_system::vwarning().