#include <algorithm>
#include <deque>
#include <limits>
#include <string>
#include "oct-locbuf.h"
#include "Cell.h"
#include "builtin-defun-decls.h"
#include "defun.h"
#include "errwarn.h"
#include "error.h"
#include "ov.h"
#include "unwind-prot.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 50 of file strfind.cc.
#define TABSIZE (std::numeric_limits<unsigned char>::max () + 1) |
Definition at line 51 of file strfind.cc.
OCTAVE_EXPORT octave_value_list Fstrfind | ( | const octave_value_list & | args, |
int | |||
) |
Definition at line 213 of file strfind.cc.
References octave_value::cell_value(), octave_value::char_array_value(), Array< T, Alloc >::dims(), do_simple_cellfun(), error(), octave_value::is_string(), octave_value::iscell(), octave_value::isempty(), Matrix, Array< T, Alloc >::numel(), OCTAVE_LOCAL_BUFFER, octave_value(), print_usage(), qs_preprocess(), qs_search(), TABSIZE, and transform().
OCTAVE_EXPORT octave_value_list Fstrrep | ( | const octave_value_list & | args, |
int | |||
) |
Definition at line 413 of file strfind.cc.
References octave_value::cell_value(), octave_value::char_array_value(), octave_value::char_matrix_value(), Array< T, Alloc >::columns(), Array< T, Alloc >::dims(), do_simple_cellfun(), error(), charMatrix::extract(), charMatrix::insert(), octave_value::is_string(), octave_value::iscell(), Cell::iscellstr(), Array< T, Alloc >::numel(), OCTAVE_LOCAL_BUFFER, print_usage(), qs_preprocess(), qs_replace(), octave_value::rows(), Array< T, Alloc >::rows(), and TABSIZE.
|
static |
Definition at line 56 of file strfind.cc.
References Array< T, Alloc >::data(), m, Array< T, Alloc >::numel(), ORD, TABSIZE, and x.
Referenced by Fstrfind(), and Fstrrep().
|
static |
Definition at line 320 of file strfind.cc.
References Array< T, Alloc >::clear(), Array< T, Alloc >::data(), Array< T, Alloc >::fortran_vec(), Array< T, Alloc >::numel(), and qs_search().
Referenced by Fstrrep().
|
static |
Definition at line 69 of file strfind.cc.
References Array< T, Alloc >::data(), m, min(), n, Array< T, Alloc >::numel(), ORD, x, and Array< T, Alloc >::xelem().
Referenced by Fstrfind(), and qs_replace().