GNU Octave
3.8.0
A high-level interpreted language, primarily intended for numerical computations, mostly compatible with Matlab
|
#include <algorithm>
#include <deque>
#include <limits>
#include <string>
#include "Cell.h"
#include "ov.h"
#include "defun.h"
#include "unwind-prot.h"
#include "gripes.h"
#include "utils.h"
Go to the source code of this file.
Macros | |
#define | ORD(ch) static_cast<unsigned char>(ch) |
#define | TABSIZE (std::numeric_limits<unsigned char>::max () + 1) |
Functions | |
OCTAVE_EXPORT octave_value_list | Fstrfind (const octave_value_list &args, int) |
OCTAVE_EXPORT octave_value_list | Fstrrep (const octave_value_list &args, int) |
static void | qs_preprocess (const Array< char > &needle, octave_idx_type *table) |
static Array< char > | qs_replace (const Array< char > &str, const Array< char > &pat, const Array< char > &rep, const octave_idx_type *table, bool overlaps=true) |
static Array< octave_idx_type > | qs_search (const Array< char > &needle, const Array< char > &haystack, const octave_idx_type *table, bool overlaps=true) |
#define ORD | ( | ch | ) | static_cast<unsigned char>(ch) |
Definition at line 42 of file strfind.cc.
Referenced by qs_preprocess(), and qs_search().
Definition at line 43 of file strfind.cc.
Referenced by Fstrfind(), Fstrrep(), and qs_preprocess().
OCTAVE_EXPORT octave_value_list Fstrfind | ( | const octave_value_list & | args, |
int | |||
) |
Definition at line 189 of file strfind.cc.
References octave_value::cell_value(), octave_value::char_array_value(), Array< T >::dims(), do_simple_cellfun(), error(), Fstrfind(), octave_value::is_cell(), octave_value::is_scalar_type(), octave_value::is_string(), octave_value::length(), Array< T >::numel(), OCTAVE_LOCAL_BUFFER, octave_value(), print_usage(), qs_preprocess(), qs_search(), and TABSIZE.
Referenced by Fstrfind().
OCTAVE_EXPORT octave_value_list Fstrrep | ( | const octave_value_list & | args, |
int | |||
) |
Definition at line 360 of file strfind.cc.
References octave_value::cell_value(), octave_base_value::char_array_value(), octave_value::char_array_value(), Array< T >::dims(), do_simple_cellfun(), error(), Fstrrep(), octave_value::is_cell(), octave_value::is_scalar_type(), octave_value::is_string(), octave_value::length(), Array< T >::numel(), OCTAVE_LOCAL_BUFFER, print_usage(), qs_preprocess(), qs_replace(), octave_value::rep, and TABSIZE.
Referenced by Fstrrep().
|
static |
Definition at line 48 of file strfind.cc.
References Array< T >::data(), Array< T >::numel(), ORD, TABSIZE, and x.
Referenced by Fstrfind(), and Fstrrep().
|
static |
Definition at line 275 of file strfind.cc.
References Array< T >::clear(), Array< T >::data(), Array< T >::fortran_vec(), Array< T >::numel(), and qs_search().
Referenced by Fstrrep().
|
static |
Definition at line 62 of file strfind.cc.
References Array< T >::data(), min(), Array< T >::numel(), ORD, x, and Array< T >::xelem().
Referenced by Fstrfind(), and qs_replace().