GNU Octave  4.4.1
A high-level interpreted language, primarily intended for numerical computations, mostly compatible with Matlab
strfind.cc File Reference
#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 "ov.h"
#include "unwind-prot.h"
#include "utils.h"
Include dependency graph for strfind.cc:

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) or if ar
 
is longer than or if then or only for unique occurrences of the complete pattern (false). The default is true. If a cell array of strings ar
 
static void qs_preprocess (const Array< char > &needle, octave_idx_type *table)
 
static Array< octave_idx_typeqs_search (const Array< char > &needle, const Array< char > &haystack, const octave_idx_type *table, bool overlaps=true)
 

Variables

is longer than ar {str}
 
is specified then as specified above Examples
 

Macro Definition Documentation

◆ ORD

#define ORD (   ch)    static_cast<unsigned char>(ch)

Definition at line 45 of file strfind.cc.

Referenced by qs_preprocess(), and qs_search().

◆ TABSIZE

#define TABSIZE   (std::numeric_limits<unsigned char>::max () + 1)

Definition at line 46 of file strfind.cc.

Referenced by pattern(), and qs_preprocess().

Function Documentation

◆ Fstrfind()

OCTAVE_EXPORT octave_value_list Fstrfind ( const octave_value_list args,
int   
)

Definition at line 190 of file strfind.cc.

Referenced by pattern().

◆ pattern()

◆ qs_preprocess()

static void qs_preprocess ( const Array< char > &  needle,
octave_idx_type table 
)
static

Definition at line 51 of file strfind.cc.

References Array< T >::data(), i, Array< T >::numel(), ORD, TABSIZE, and x.

Referenced by pattern().

◆ qs_search()

static Array<octave_idx_type> qs_search ( const Array< char > &  needle,
const Array< char > &  haystack,
const octave_idx_type table,
bool  overlaps = true 
)
static

Definition at line 64 of file strfind.cc.

References Array< T >::data(), i, k, min(), Array< T >::numel(), ORD, result, x, and y.

Referenced by pattern().

Variable Documentation

◆ ar

is specified then ar {str}

Definition at line 190 of file strfind.cc.

◆ Examples

is specified then as specified above Examples

Definition at line 190 of file strfind.cc.