MCPcopy Create free account
hub / github.com/ashvardanian/StringZilla / lookup

Function lookup

include/stringzilla/stringzilla.hpp:4622–4627  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

4620 */
4621template <typename char_type_>
4622void lookup( //
4623 basic_string_slice<char_type_ const> source, basic_look_up_table<char_type_> const &table,
4624 char_type_ *target) noexcept {
4625 static_assert(sizeof(char_type_) == 1, "The character type must be 1 byte long.");
4626 sz_lookup((sz_ptr_t)target, (sz_size_t)source.size(), (sz_cptr_t)source.data(), (sz_cptr_t)table.raw());
4627}
4628
4629/**
4630 * @brief Replaces @b (in-place) all characters in the string using the provided lookup table.

Callers 1

basic_stringClass · 0.70

Calls 4

rawMethod · 0.80
sz_lookupFunction · 0.70
sizeMethod · 0.45
dataMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…