Blender  V3.3
Classes | Namespaces | Macros | Functions | Variables
string_search.cc File Reference
#include "BLI_array.hh"
#include "BLI_linear_allocator.hh"
#include "BLI_multi_value_map.hh"
#include "BLI_span.hh"
#include "BLI_string.h"
#include "BLI_string_ref.hh"
#include "BLI_string_search.h"
#include "BLI_string_utf8.h"
#include "BLI_timeit.hh"

Go to the source code of this file.

Classes

struct  SearchItem
 
struct  StringSearch
 

Namespaces

 blender
 
 

Macros

#define UI_MENU_ARROW_SEP   "\xe2\x96\xb6"
 
#define UI_MENU_ARROW_SEP_UNICODE   0x25b6
 

Functions

static int64_t blender::string_search::count_utf8_code_points (StringRef str)
 
int blender::string_search::damerau_levenshtein_distance (StringRef a, StringRef b)
 
int blender::string_search::get_fuzzy_match_errors (StringRef query, StringRef full)
 
static bool blender::string_search::match_word_initials (StringRef query, Span< StringRef > words, Span< int > word_match_map, MutableSpan< bool > r_word_is_matched, int start=0)
 
static int blender::string_search::get_shortest_word_index_that_startswith (StringRef query, Span< StringRef > words, Span< int > word_match_map)
 
static int blender::string_search::get_word_index_that_fuzzy_matches (StringRef query, Span< StringRef > words, Span< int > word_match_map, int *r_error_count)
 
static int blender::string_search::score_query_against_words (Span< StringRef > query_words, Span< StringRef > result_words)
 
void blender::string_search::extract_normalized_words (StringRef str, LinearAllocator<> &allocator, Vector< StringRef, 64 > &r_words)
 
StringSearchBLI_string_search_new ()
 
void BLI_string_search_add (StringSearch *search, const char *str, void *user_data, const int weight)
 
int BLI_string_search_query (StringSearch *search, const char *query, void ***r_data)
 
void BLI_string_search_free (StringSearch *string_search)
 

Variables

static constexpr int blender::string_search::unused_word = -1
 

Macro Definition Documentation

◆ UI_MENU_ARROW_SEP

#define UI_MENU_ARROW_SEP   "\xe2\x96\xb6"

Definition at line 14 of file string_search.cc.

◆ UI_MENU_ARROW_SEP_UNICODE

#define UI_MENU_ARROW_SEP_UNICODE   0x25b6

Definition at line 15 of file string_search.cc.

Function Documentation

◆ BLI_string_search_add()

void BLI_string_search_add ( StringSearch search,
const char *  str,
void user_data,
int  weight 
)

◆ BLI_string_search_free()

void BLI_string_search_free ( StringSearch string_search)

◆ BLI_string_search_new()

StringSearch* BLI_string_search_new ( void  )

◆ BLI_string_search_query()

int BLI_string_search_query ( StringSearch search,
const char *  query,
void ***  r_data 
)