Changeset View
Changeset View
Standalone View
Standalone View
source/blender/blenlib/intern/string_search.cc
| /* SPDX-License-Identifier: GPL-2.0-or-later */ | /* SPDX-License-Identifier: GPL-2.0-or-later */ | ||||
| #include "BLI_array.hh" | #include "BLI_array.hh" | ||||
| #include "BLI_linear_allocator.hh" | #include "BLI_linear_allocator.hh" | ||||
| #include "BLI_multi_value_map.hh" | #include "BLI_multi_value_map.hh" | ||||
| #include "BLI_span.hh" | #include "BLI_span.hh" | ||||
| #include "BLI_string.h" | #include "BLI_string.h" | ||||
| #include "BLI_string_ref.hh" | #include "BLI_string_ref.hh" | ||||
| #include "BLI_string_search.h" | #include "BLI_string_search.h" | ||||
| #include "BLI_string_utf8.h" | #include "BLI_string_utf8.h" | ||||
| #include "BLI_timeit.hh" | #include "BLI_timeit.hh" | ||||
| /* Right arrow, keep in sync with #UI_MENU_ARROW_SEP in `UI_interface.h`. */ | /* Right arrow, keep in sync with #UI_MENU_ARROW_SEP in `UI_interface.h`. */ | ||||
| #define UI_MENU_ARROW_SEP "\xe2\x96\xb6" | #define UI_MENU_ARROW_SEP "\xe2\x96\xb8" | ||||
| #define UI_MENU_ARROW_SEP_UNICODE 0x25b6 | #define UI_MENU_ARROW_SEP_UNICODE 0x25b8 | ||||
| namespace blender::string_search { | namespace blender::string_search { | ||||
| static int64_t count_utf8_code_points(StringRef str) | static int64_t count_utf8_code_points(StringRef str) | ||||
| { | { | ||||
| return static_cast<int64_t>(BLI_strnlen_utf8(str.data(), static_cast<size_t>(str.size()))); | return static_cast<int64_t>(BLI_strnlen_utf8(str.data(), static_cast<size_t>(str.size()))); | ||||
| } | } | ||||
| ▲ Show 20 Lines • Show All 467 Lines • Show Last 20 Lines | |||||