|
std::vector< std::string > | get_encoding_list () |
|
template<typename T > |
std::string | rational_approx (T val, int len) |
|
Complex | str2double (const std::string &str_arg) |
|
template<typename T > |
bool | strcmp (const T &str_a, const T &str_b) |
| Octave string utility functions. More...
|
|
template<typename T > |
bool | strcmp (const T &str_a, const typename T::value_type *str_b) |
| True if string is the same as character sequence. More...
|
|
template<typename T > |
bool | strcmpi (const T &str_a, const T &str_b) |
| True if strings are the same, ignoring case. More...
|
|
template<typename T > |
bool | strcmpi (const T &str_a, const typename T::value_type *str_b) |
| True if string is the same as character sequence, ignoring case. More...
|
|
template<typename T > |
bool | strncmp (const T &str_a, const T &str_b, const typename T::size_type n) |
| True if the first N characters are the same. More...
|
|
template<typename T > |
bool | strncmp (const T &str_a, const typename T::value_type *str_b, const typename T::size_type n) |
| True if the first N characters are the same. More...
|
|
template<typename T > |
bool | strncmpi (const T &str_a, const T &str_b, const typename T::size_type n) |
| True if the first N characters are the same, ignoring case. More...
|
|
template<typename T > |
bool | strncmpi (const T &str_a, const typename T::value_type *str_b, const typename T::size_type n) |
| True if the first N characters are the same, ignoring case. More...
|
|
std::string | u16_to_encoding (const std::string &who, const std::u16string &u16_string, const std::string &encoding) |
|
std::string | u8_from_encoding (const std::string &who, const std::string &native_string, const std::string &encoding) |
|
std::string | u8_to_encoding (const std::string &who, const std::string &u8_string, const std::string &encoding) |
|
unsigned int | u8_validate (const std::string &who, std::string &in_string, const u8_fallback_type type=U8_REPLACEMENT_CHAR) |
|
template<typename T >
bool strcmp |
( |
const T & |
str_a, |
|
|
const T & |
str_b |
|
) |
| |
Octave string utility functions.
This functions provide a C++ interface to most string functions available in the Octave interpreter.
Specializations for Array may consider its dimensions in addition to the actual string contents.
- Attention
- Octave's string comparison functions return true when strings are are equal, just the opposite of the corresponding C library functions. In addition, Octave's function only return bool and do not check lexicographical order. True if strings are the same.
Specialization for Array<char>
When comparing whole Array of chars, the actual Array dimensions are significant. A column vector and row vector with the same char array, will still return false.
Referenced by mxArray_base::is_class(), main(), mexGetVariable(), mexPutVariable(), octave_get_sig_number(), and bp_table::parse_dbfunction_params().
template<typename T >
bool strcmpi |
( |
const T & |
str_a, |
|
|
const T & |
str_b |
|
) |
| |
True if strings are the same, ignoring case.
Specialization for Array<char>
When comparing whole Array of chars, the actual Array dimensions are significant. A column vector and row vector with the same char array, will still return false.
Referenced by Fchol(), Feig(), Fjsondecode(), and Fjsonencode().