Blender
V3.3
|
#include <ctype.h>
#include <inttypes.h>
#include <math.h>
#include <stdarg.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include "MEM_guardedalloc.h"
#include "BLI_dynstr.h"
#include "BLI_string.h"
#include "BLI_utildefines.h"
Go to the source code of this file.
Macros | |
#define | CASE_PAIR(value_src, value_dst) |
Functions | |
String Duplicate/Copy | |
char * | BLI_strdupn (const char *str, const size_t len) |
char * | BLI_strdup (const char *str) |
char * | BLI_strdupcat (const char *__restrict str1, const char *__restrict str2) |
char * | BLI_strncpy (char *__restrict dst, const char *__restrict src, const size_t maxncpy) |
char * | BLI_strncpy_ensure_pad (char *__restrict dst, const char *__restrict src, const char pad, size_t maxncpy) |
size_t | BLI_strncpy_rlen (char *__restrict dst, const char *__restrict src, const size_t maxncpy) |
size_t | BLI_strcpy_rlen (char *__restrict dst, const char *__restrict src) |
String Printing | |
size_t | BLI_vsnprintf (char *__restrict buffer, size_t maxncpy, const char *__restrict format, va_list arg) |
size_t | BLI_vsnprintf_rlen (char *__restrict buffer, size_t maxncpy, const char *__restrict format, va_list arg) |
size_t | BLI_snprintf (char *__restrict dst, size_t maxncpy, const char *__restrict format,...) |
size_t | BLI_snprintf_rlen (char *__restrict dst, size_t maxncpy, const char *__restrict format,...) |
char * | BLI_sprintfN (const char *__restrict format,...) |
String Escape/Un-Escape | |
size_t | BLI_str_escape (char *__restrict dst, const char *__restrict src, const size_t dst_maxncpy) |
BLI_INLINE bool | str_unescape_pair (char c_next, char *r_out) |
size_t | BLI_str_unescape_ex (char *__restrict dst, const char *__restrict src, const size_t src_maxncpy, const size_t dst_maxncpy, bool *r_is_complete) |
size_t | BLI_str_unescape (char *__restrict dst, const char *__restrict src, const size_t src_maxncpy) |
const char * | BLI_str_escape_find_quote (const char *str) |
String Quote/Un-Quote | |
bool | BLI_str_quoted_substr_range (const char *__restrict str, const char *__restrict prefix, int *__restrict r_start, int *__restrict r_end) |
bool | BLI_str_quoted_substr (const char *__restrict str, const char *__restrict prefix, char *result, size_t result_maxlen) |
String Replace | |
char * | BLI_str_replaceN (const char *__restrict str, const char *__restrict substr_old, const char *__restrict substr_new) |
void | BLI_str_replace_char (char *str, char src, char dst) |
bool | BLI_str_replace_table_exact (char *string, const size_t string_len, const char *replace_table[][2], int replace_table_len) |
String Comparison/Matching | |
int | BLI_strcaseeq (const char *a, const char *b) |
char * | BLI_strcasestr (const char *s, const char *find) |
int | BLI_string_max_possible_word_count (const int str_len) |
bool | BLI_string_has_word_prefix (const char *haystack, const char *needle, size_t needle_len) |
bool | BLI_string_all_words_matched (const char *name, const char *str, int(*words)[2], const int words_len) |
char * | BLI_strncasestr (const char *s, const char *find, size_t len) |
int | BLI_strcasecmp (const char *s1, const char *s2) |
int | BLI_strncasecmp (const char *s1, const char *s2, size_t len) |
static int | left_number_strcmp (const char *s1, const char *s2, int *tiebreaker) |
int | BLI_strcasecmp_natural (const char *s1, const char *s2) |
int | BLI_strcmp_ignore_pad (const char *str1, const char *str2, const char pad) |
String Comparison at Start/End | |
int | BLI_str_index_in_array_n (const char *__restrict str, const char **__restrict str_array, const int str_array_len) |
int | BLI_str_index_in_array (const char *__restrict str, const char **__restrict str_array) |
bool | BLI_str_startswith (const char *__restrict str, const char *__restrict start) |
bool | BLI_strn_endswith (const char *__restrict str, const char *__restrict end, size_t slength) |
bool | BLI_str_endswith (const char *__restrict str, const char *__restrict end) |
String Length | |
size_t | BLI_strnlen (const char *s, const size_t maxlen) |
String Case Conversion | |
char | BLI_tolower_ascii (const char c) |
char | BLI_toupper_ascii (const char c) |
void | BLI_str_tolower_ascii (char *str, const size_t len) |
void | BLI_str_toupper_ascii (char *str, const size_t len) |
String Stripping | |
void | BLI_str_rstrip (char *str) |
int | BLI_str_rstrip_float_zero (char *str, const char pad) |
String Split (Partition) | |
size_t | BLI_str_partition (const char *str, const char delim[], const char **sep, const char **suf) |
size_t | BLI_str_rpartition (const char *str, const char delim[], const char **sep, const char **suf) |
size_t | BLI_str_partition_ex (const char *str, const char *end, const char delim[], const char **sep, const char **suf, const bool from_right) |
int | BLI_string_find_split_words (const char *str, const size_t len, const char delim, int r_words[][2], int words_max) |
String Formatting (Numeric) | |
static size_t | BLI_str_format_int_grouped_ex (char src[16], char dst[16], int num_len) |
size_t | BLI_str_format_int_grouped (char dst[16], int num) |
size_t | BLI_str_format_uint64_grouped (char dst[16], uint64_t num) |
void | BLI_str_format_byte_unit (char dst[15], long long int bytes, const bool base_10) |
void | BLI_str_format_decimal_unit (char dst[7], int number_to_format) |
#define CASE_PAIR | ( | value_src, | |
value_dst | |||
) |
size_t BLI_snprintf | ( | char *__restrict | dst, |
size_t | maxncpy, | ||
const char *__restrict | format, | ||
... | |||
) |
Definition at line 194 of file string.c.
References BLI_vsnprintf().
Referenced by BLI_str_format_decimal_unit().
size_t BLI_snprintf_rlen | ( | char *__restrict | dst, |
size_t | maxncpy, | ||
const char *__restrict | format, | ||
... | |||
) |
Definition at line 210 of file string.c.
References BLI_vsnprintf_rlen().
Referenced by BLI_str_format_byte_unit().
char* BLI_sprintfN | ( | const char *__restrict | format, |
... | |||
) |
Definition at line 226 of file string.c.
References BLI_dynstr_free(), BLI_dynstr_get_cstring(), BLI_dynstr_new(), and BLI_dynstr_vappendf().
bool BLI_str_endswith | ( | const char *__restrict | str, |
const char *__restrict | end | ||
) |
Find if a string ends with another string.
str | The string to search within. |
end | The string we look for at the end. |
Definition at line 887 of file string.c.
References BLI_strn_endswith(), and str.
Referenced by check_valid_camera_multiview(), blender::ed::asset::index::AssetLibraryIndex::init_unused_index_files(), menu_items_from_ui_create(), replace_bbone_len_scale_rnapath(), replace_bbone_scale_rnapath(), sequencer_fcurves_targets_color_strip(), update_mapping_node_fcurve_rna_path_callback(), and WM_keymap_poll().
size_t BLI_str_escape | ( | char *__restrict | dst, |
const char *__restrict | src, | ||
size_t | dst_maxncpy | ||
) |
This roughly matches C and Python's string escaping with double quotes - "
.
Since every character may need escaping, it's common to create a buffer twice as large as the input.
dst | The destination string, at least dst_maxncpy, typically (strlen(src) * 2) + 1 . |
src | The un-escaped source string. |
dst_maxncpy | The maximum number of bytes allowable to copy. |
Definition at line 250 of file string.c.
References BLI_assert, Freestyle::c, ELEM, len, src, UNLIKELY, and void.
Referenced by action_flip_pchan(), action_flip_pchan_rna_paths(), add_attribute_search_or_value_buttons(), bc_enable_fcurves(), BKE_action_fix_paths_rename(), BKE_animdata_fix_paths_rename(), BKE_animsys_fix_rna_path_rename(), BKE_linestyle_path_to_color_ramp(), BKE_tracking_get_rna_path_for_plane_track(), BKE_tracking_get_rna_path_for_track(), BKE_tracking_get_rna_path_prefix_for_plane_track(), BKE_tracking_get_rna_path_prefix_for_track(), bpy_escape_identifier(), do_version_hue_sat_node(), draw_property_for_output_socket(), draw_property_for_socket(), drw_uniform_attribute_lookup(), get_rna_access(), ArmatureImporter::get_rna_path_for_joint(), nodeRemoveNode(), RNA_path_append(), RNA_path_from_ID_to_property_index(), RNA_path_full_ID_py(), RNA_path_property_py(), RNA_property_as_string(), seq_convert_transform_crop(), seq_convert_transform_crop_2(), seq_speed_factor_fix_rna_path(), sequencer_rna_path_prefix(), shapekey_adrcodes_to_paths(), StringEscape::testEscapeWords(), update_mapping_node_fcurve_rna_path_callback(), update_mapping_node_inputs_and_properties(), version_liboverride_rnacollections_insertion_object(), and version_node_socket_index_animdata().
const char* BLI_str_escape_find_quote | ( | const char * | str | ) |
Find the first un-escaped quote in the string (to find the end of the string).
str | Typically this is the first character in a quoted string. Where the character before *str would be " . |
Definition at line 341 of file string.c.
Referenced by action_flip_pchan_rna_paths(), BLI_str_quoted_substr_range(), and rna_path_token_in_brackets().
Format a size in bytes using binary units. 1000 -> 1 KB Number of decimal places grows with the used unit (e.g. 1.5 MB, 1.55 GB, 1.545 TB).
dst | The resulting string. Dimension of 14 to support largest possible value for bytes (#LLONG_MAX). |
bytes | Number to format. |
base_10 | Calculate using base 10 (GB, MB, ...) or 2 (GiB, MiB, ...). |
Definition at line 1132 of file string.c.
References ARRAY_SIZE, BLI_snprintf_rlen(), BLI_STATIC_ASSERT, BLI_str_rstrip_float_zero(), BLI_strncpy(), fabs(), len, MAX2, and order.
Referenced by BKE_ptcache_update_info(), BLI_filelist_entry_size_to_string(), ED_info_statusbar_string_ex(), EEVEE_lightcache_info_update(), blender::HashTableStats::print(), blender::Vector< T, InlineBufferCapacity, Allocator >::print_stats(), and TEST().
void BLI_str_format_decimal_unit | ( | char | dst[7], |
int | number_to_format | ||
) |
Format a count to up to 6 places (plus '\0' terminator) string using long number names abbreviations. Used to produce a compact representation of large numbers.
1 -> 1 15 -> 15 155 -> 155 1555 -> 1.6K 15555 -> 15.6K 155555 -> 156K 1555555 -> 1.6M 15555555 -> 15.6M 155555555 -> 156M 1000000000 -> 1B ...
Length of 7 is the maximum of the resulting string, for example, -15.5K\0
.
Definition at line 1158 of file string.c.
References ARRAY_SIZE, BLI_snprintf(), fabsf, and order.
Referenced by blender::ed::spreadsheet::GeometryDataSetTreeViewItem::build_row(), and TEST().
size_t BLI_str_format_int_grouped | ( | char | dst[16], |
int | num | ||
) |
Format ints with decimal grouping. 1000 -> 1,000
dst | The resulting string |
num | Number to format |
Definition at line 1114 of file string.c.
References BLI_str_format_int_grouped_ex(), and src.
Referenced by BKE_ptcache_update_info(), blender::ed::space_node::create_inspection_string_for_geometry(), outliner_draw_userbuts(), spreadsheet_footer_region_draw(), and TEST().
|
static |
Definition at line 1090 of file string.c.
References src.
Referenced by BLI_str_format_int_grouped(), and BLI_str_format_uint64_grouped().
size_t BLI_str_format_uint64_grouped | ( | char | dst[16], |
uint64_t | num | ||
) |
Format uint64_t with decimal grouping. 1000 -> 1,000
dst | The resulting string |
num | Number to format |
Definition at line 1122 of file string.c.
References BLI_str_format_int_grouped_ex(), PRIu64, and src.
int BLI_str_index_in_array | ( | const char *__restrict | str, |
const char **__restrict | str_array | ||
) |
Return index of a string in a string array.
str | The string to find. |
str_array | Array of strings, (must be NULL-terminated). |
Definition at line 847 of file string.c.
Referenced by bpyunits_validate().
int BLI_str_index_in_array_n | ( | const char *__restrict | str, |
const char **__restrict | str_array, | ||
int | str_array_len | ||
) |
size_t BLI_str_partition | ( | const char * | str, |
const char | delim[], | ||
const char ** | sep, | ||
const char ** | suf | ||
) |
Find the first char matching one of the chars in delim, from left.
str | The string to search within. |
delim | The set of delimiters to search for, as unicode values. |
sep | Return value, set to the first delimiter found (or NULL if none found). |
suf | Return value, set to next char after the first delimiter found (or NULL if none found). |
Definition at line 989 of file string.c.
References BLI_str_partition_ex(), NULL, and str.
Referenced by passtype_from_name(), and TEST().
size_t BLI_str_partition_ex | ( | const char * | str, |
const char * | end, | ||
const char | delim[], | ||
const char ** | sep, | ||
const char ** | suf, | ||
const bool | from_right | ||
) |
Definition at line 999 of file string.c.
References BLI_assert, Freestyle::c, NULL, and str.
Referenced by BLI_str_partition(), and BLI_str_rpartition().
bool BLI_str_quoted_substr | ( | const char *__restrict | str, |
const char *__restrict | prefix, | ||
char * | result, | ||
size_t | result_maxlen | ||
) |
Fills result with text within "" that appear after some the contents of prefix. i.e. for string pose["apples"]
with prefix pose[
, it will return apples
.
str | is the entire string to chop. |
prefix | is the part of the string to step over. |
result | The buffer to fill. |
result_maxlen | The maximum size of the buffer (including nil terminator). |
Assume that the strings returned must be freed afterwards, and that the inputs will contain data we want.
Definition at line 424 of file string.c.
References BLI_str_quoted_substr_range(), BLI_str_unescape_ex(), result, and str.
Referenced by animchan_sync_fcurve_scene(), autokeyframe_pose(), blender::bke::BKE_action_find_fcurves_with_bones(), BKE_fcurves_filter(), clear_anim_v3d_exec(), copy_animedit_keys(), delete_key_v3d_without_keying_set(), BCAnimationCurve::get_animation_name(), getname_anim_fcurve(), pose_select_same_keyingset(), and skip_fcurve_selected_data().
bool BLI_str_quoted_substr_range | ( | const char *__restrict | str, |
const char *__restrict | prefix, | ||
int *__restrict | r_start, | ||
int *__restrict | r_end | ||
) |
Definition at line 359 of file string.c.
References BLI_assert_msg, BLI_str_escape_find_quote(), NULL, str, and UNLIKELY.
Referenced by BLI_str_quoted_substr().
void BLI_str_replace_char | ( | char * | str, |
char | src, | ||
char | dst | ||
) |
In-place replace every src to dst in str.
str | The string to operate on. |
src | The character to replace. |
dst | The character to replace with. |
Definition at line 503 of file string.c.
Referenced by BLI_path_abs(), BLI_path_rel(), BLI_path_slash_native(), BLI_path_to_display_name(), blender::gpu::create_gpu_name(), blender::gpu::create_key(), blender::io::usd::get_tex_image_asset_path(), make_element_name(), memiter_words10k_test(), uri_from_filename(), view_layer_add_lightgroup_exec(), viewlayer_aov_make_name_unique(), and viewlayer_lightgroup_make_name_unique().
bool BLI_str_replace_table_exact | ( | char * | string, |
size_t | string_len, | ||
const char * | replace_table[][2], | ||
int | replace_table_len | ||
) |
Simple exact-match string replacement.
replace_table | Array of source, destination pairs. |
Definition at line 513 of file string.c.
References BLI_strncpy(), and STREQ.
Referenced by blo_do_versions_userdef().
char* BLI_str_replaceN | ( | const char *__restrict | str, |
const char *__restrict | substr_old, | ||
const char *__restrict | substr_new | ||
) |
string with all instances of substr_old replaced with substr_new, Returns a copy of the c-string str into a newly MEM_mallocN'd and returns it.
str | The string to replace occurrences of substr_old in |
substr_old | The text in the string to find and replace |
substr_new | The text in the string to find and replace |
Returns | the duplicated string |
Definition at line 448 of file string.c.
References BLI_assert, BLI_dynstr_append(), BLI_dynstr_free(), BLI_dynstr_get_cstring(), BLI_dynstr_nappend(), BLI_dynstr_new(), BLI_strdup(), NULL, and str.
Referenced by BKE_image_get_tile_strformat(), do_versions_sequencer_speed_effect_recursive(), blender::nodes::node_fn_replace_string_cc::replace_all(), replace_bbone_easing_rnapath(), and updateDuplicateActionConstraintSettings().
size_t BLI_str_rpartition | ( | const char * | str, |
const char | delim[], | ||
const char ** | sep, | ||
const char ** | suf | ||
) |
Find the first char matching one of the chars in delim, from right.
str | The string to search within. |
delim | The set of delimiters to search for, as unicode values. |
sep | Return value, set to the first delimiter found (or NULL if none found). |
suf | Return value, set to next char after the first delimiter found (or NULL if none found). |
Definition at line 994 of file string.c.
References BLI_str_partition_ex(), NULL, and str.
Referenced by BKE_scene_multiview_view_prefix_get(), imb_exr_insert_view_name(), and TEST().
void BLI_str_rstrip | ( | char * | str | ) |
Strip white-space from end of the string.
Definition at line 951 of file string.c.
References str.
Referenced by ED_area_status_text(), and fsmenu_xdg_user_dirs_parse().
int BLI_str_rstrip_float_zero | ( | char * | str, |
char | pad | ||
) |
Strip trailing zeros from a float, eg: 0.0000 -> 0.0 2.0010 -> 2.001
str | |
pad |
Definition at line 963 of file string.c.
Referenced by ANIM_add_driver(), BLI_str_format_byte_unit(), ui_but_copy_numeric_value(), and ui_textedit_begin().
bool BLI_str_startswith | ( | const char *__restrict | str, |
const char *__restrict | start | ||
) |
Find if a string starts with another string.
str | The string to search within. |
start | The string we look for at the start. |
Definition at line 860 of file string.c.
References str.
Referenced by blend_header_check_magic(), blendthumb_create_thumb_from_file(), BLI_path_contains(), blo_do_versions_280(), and sequencer_fcurves_targets_color_strip().
void BLI_str_tolower_ascii | ( | char * | str, |
size_t | len | ||
) |
String case conversion, not affected by locale.
Definition at line 927 of file string.c.
References BLI_tolower_ascii(), len, and str.
Referenced by BLI_filename_make_safe_ex(), BLI_path_contains(), brush_add_gpencil_exec(), blender::string_search::extract_normalized_words(), userpref_main_region_layout(), and WM_operator_py_idname().
void BLI_str_toupper_ascii | ( | char * | str, |
const size_t | len | ||
) |
Definition at line 936 of file string.c.
References BLI_toupper_ascii(), len, and str.
Referenced by WM_operator_bl_idname().
size_t BLI_str_unescape | ( | char *__restrict | dst, |
const char *__restrict | src, | ||
size_t | src_maxncpy | ||
) |
See BLI_str_unescape_ex doc-string.
This function makes the assumption that dst
always has at least src_maxncpy
bytes available.
Use BLI_str_unescape_ex if dst
has a smaller fixed size.
Definition at line 327 of file string.c.
References Freestyle::c, len, src, str_unescape_pair(), and UNLIKELY.
Referenced by action_flip_pchan_rna_paths(), bpy_unescape_identifier(), rna_path_token_in_brackets(), and StringEscape::testEscapeWords().
size_t BLI_str_unescape_ex | ( | char *__restrict | dst, |
const char *__restrict | src, | ||
size_t | src_maxncpy, | ||
size_t | dst_maxncpy, | ||
bool * | r_is_complete | ||
) |
This roughly matches C and Python's string escaping with double quotes - "
.
The destination will never be larger than the source, it will either be the same or up to half when all characters are escaped.
dst | The destination string, at least the size of strlen(src) + 1 . |
src | The escaped source string. |
src_maxncpy | The maximum number of bytes allowable to copy from src . |
dst_maxncpy | The maximum number of bytes allowable to copy into dst . |
r_is_complete | Set to true when |
Definition at line 301 of file string.c.
References Freestyle::c, len, src, str_unescape_pair(), and UNLIKELY.
Referenced by BLI_str_quoted_substr().
int BLI_strcasecmp | ( | const char * | s1, |
const char * | s2 | ||
) |
Definition at line 623 of file string.c.
Referenced by assert_sorted_ids(), BLI_strcaseeq(), channels_alpha_sort(), cmpstringp(), colormanage_colorspace_add(), compare_extension(), ED_text_format_get(), ED_text_is_syntax_highlight_supported(), blender::ed::outliner::TreeElementRNAStruct::expand(), blender::ed::outliner::TreeElementRNAProperty::expand(), exr_rgba_channelname(), id_sort_by_name(), keycmp(), path_extension_check_ex(), seq_disk_cache_get_file_entry_by_path(), studiolight_cmp(), and text_find_and_replace().
int BLI_strcasecmp_natural | ( | const char * | s1, |
const char * | s2 | ||
) |
Case insensitive, natural string comparison, keeping numbers in order.
Definition at line 719 of file string.c.
References ELEM, and left_number_strcmp().
Referenced by AnimationImporter::Assign_float_animations(), bli_compare(), compare_tiebreaker(), StringCasecmpNatural::testReturnsLessThanZeroForAll(), StringCasecmpNatural::testReturnsMoreThanZeroForAll(), StringCasecmpNatural::testReturnsZeroForAll(), treesort_alpha(), treesort_alpha_ob(), blender::ed::space_node::ui_node_item_name_compare(), ui_rna_collection_search_update_fn(), and vgroup_sort_name().
int BLI_strcaseeq | ( | const char * | a, |
const char * | b | ||
) |
Compare two strings without regard to case.
True | if the strings are equal, false otherwise. |
Definition at line 533 of file string.c.
References Freestyle::a, usdtokens::b(), and BLI_strcasecmp().
Referenced by imb_exr_pass_name_from_channel(), imb_exr_split_channel_name(), and ExtraHandler::parseElement().
char* BLI_strcasestr | ( | const char * | s, |
const char * | find | ||
) |
Portable replacement for strcasestr
(not available in MSVC)
Definition at line 538 of file string.c.
References BLI_strncasecmp(), Freestyle::c, len, and NULL.
Referenced by asset_tag_matches_filter(), BLI_string_flip_side_name(), block_search_panel_label_matches(), button_matches_search_filter(), file_is_blend_backup(), is_filtered_asset(), merged_element_search_fn_recursive(), name_matches_dopesheet_filter(), poselib_preview_get_next(), txt_find_string(), and unit_find_str().
int BLI_strcmp_ignore_pad | ( | const char * | str1, |
const char * | str2, | ||
char | pad | ||
) |
Like strcmp, but will ignore any heading/trailing pad char for comparison. So e.g. if pad is '*', 'world' and 'world' will compare equal.
Definition at line 786 of file string.c.
Referenced by filelist_setfilter_options().
size_t BLI_strcpy_rlen | ( | char *__restrict | dst, |
const char *__restrict | src | ||
) |
Definition at line 134 of file string.c.
References src.
Referenced by BLI_path_rel(), BLI_string_join_array_by_sep_char_with_tableN(), BLI_string_join_array_by_sep_charN(), BLI_string_join_arrayN(), draw_selected_name(), txt_add_object(), txt_combine_lines(), ui_but_update_ex(), and WM_keymap_item_raw_to_string().
char* BLI_strdup | ( | const char * | str | ) |
Duplicates the cstring str into a newly mallocN'd string and returns it.
str | The string to be duplicated |
Returns | the duplicated string |
Definition at line 42 of file string.c.
References BLI_strdupn(), and str.
Referenced by actkeys_paste_description(), add_driver_with_target(), alloc_driver_fcurve(), animsys_blend_in_fcurves(), asset_clear_get_description(), asset_view_item_but_drag_set(), BKE_appdir_app_templates(), BKE_bpath_foreach_path_allocated_process(), BKE_collection_new_name_get(), BKE_gpencil_modifier_set_error(), BKE_id_to_unique_string_key(), BKE_keyingset_add_path(), BKE_lib_override_library_property_get(), BKE_lib_override_library_property_operation_get(), BKE_modifier_set_error(), BKE_modifier_set_warning(), BKE_object_sync_to_original(), BKE_packedfile_unpack_to_file(), BKE_paint_canvas_key_get(), BKE_previewimg_cached_ensure(), BKE_previewimg_cached_thumbnail_read(), BKE_render_result_stamp_data(), bke_view_layer_verify_aov_cb(), BLF_dir_add(), BLF_dir_get(), blf_dir_metrics_search(), blf_dir_search(), blf_font_new(), blf_font_new_from_mem(), bli_builddir(), BLI_cpu_brand_string(), BLI_filename_make_safe_ex(), BLI_str_replaceN(), BLO_blendhandle_get_datablock_names(), BLO_blendhandle_get_linkable_groups(), BLT_lang_init(), BLT_lang_locale_explode(), BMO_op_vinitf(), build_pict_list_ex(), collection_drop_tooltip(), console_lb_add_str__internal(), curves_copy_data(), blender::bke::curves_copy_parameters(), data_transfer_get_description(), datastack_drop_tooltip(), decimate_desc(), draw_channel_widget_tooltip(), dropbox_tooltip(), ED_action_fcurve_ensure(), ED_armature_join_objects_exec(), ED_fsmenu_entry_set_path(), ED_gpencil_join_objects_exec(), ED_image_save_all_modified_info(), ED_object_ot_drop_named_material_tooltip(), ED_spreadsheet_context_path_set_geometry_node(), edbm_select_mode_get_description(), eevee_get_frag(), file_draw_icon(), file_draw_preview(), file_draw_tooltip_func(), file_execute(), fileentry_uiname(), filelist_file_create_entry(), filelist_readjob_list_lib_add_datablock(), filelist_readjob_list_lib_group_create(), filelist_readjob_list_lib_navigate_to_parent_entry_create(), filelist_readjob_main_assets_add_items(), filelist_readjob_recursive_dir_add_items(), folderlist_pushdir(), fsmenu_insert_entry(), fsmenu_xdg_user_dirs_parse(), graphkeys_paste_description(), headerTranslation(), icu_to_fcurves(), idprop_ui_data_update_base(), idprop_ui_data_update_string(), IMB_anim_index_rebuild_context(), IMB_thumb_path_lock(), blender::gpu::GPUPlatformGlobal::init(), lib_override_library_property_copy(), lib_override_library_property_operation_copy(), MOD_nodes_update_interface(), modifier_apply_as_shapekey_get_description(), AnimationImporter::modify_fcurve(), blender::ed::space_node::named_attribute_tooltip(), blender::ed::space_node::node_socket_get_tooltip(), object_curves_empty_hair_add_exec(), pyop_poll_message_get_fn(), pyrna_struct_anim_args_parse_ex(), RE_engine_set_error_message(), RNA_path_from_ID_to_struct(), RNA_path_property_py(), RNA_path_resolve_from_type_to_property(), RNA_path_struct_property_py(), RNA_pointer_as_string(), rna_pointer_as_string__bldata(), RNA_pointer_as_string_keywords_ex(), rna_prepend_real_ID_path(), run_string_handle_error(), screen_opengl_render_description(), sequencer_add_effect_strip_desc(), shape_key_remove_get_description(), blender::ed::spreadsheet::spreadsheet_column_assign_runtime_data(), blender::ed::spreadsheet::spreadsheet_column_copy(), blender::ed::spreadsheet::spreadsheet_column_id_copy(), blender::ed::spreadsheet::spreadsheet_context_modifier_copy(), blender::ed::spreadsheet::spreadsheet_context_node_copy(), str_ghash_tests(), strip_last_slash(), blender::ed::curves::surface_set::surface_set_exec(), blender::bke::tests::TEST_F(), text_convert_whitespace_exec(), text_copy_data(), text_save_as_exec(), track_markers_desc(), ui_apply_but_TEX(), ui_but_add_shortcut(), ui_but_convert_to_unit_alt_name(), UI_but_extra_icon_string_info_get(), ui_but_rna_menu_convert_to_menu_type(), ui_but_rna_menu_convert_to_panel_type(), ui_but_string_get_dynamic(), UI_but_string_info_get(), ui_rna_collection_search_update_fn(), ui_tooltip_data_from_button_or_extra_icon(), ui_tooltip_data_from_gizmo(), ui_tooltip_data_from_search_item_tooltip_data(), ui_tooltip_data_from_tool(), UI_view_item_drop_tooltip(), uiItemFullOMenuHold_ptr(), uilist_filter_items_default(), UNUSED_FUNCTION_WITH_RETURN_TYPE(), version_idproperty_move_data_string(), version_idproperty_ui_data(), version_liboverride_rnacollections_insertion_object(), version_liboverride_rnacollections_insertion_object_constraints(), view3d_object_data_drop_tooltip(), volume_grid_cache_get(), WM_context_path_resolve_property_full(), WM_drag_add_asset_list_item(), wm_history_file_new(), wm_history_file_read(), wm_link_append_exec(), WM_operatortype_description(), WM_operatortype_description_or_name(), and wm_save_as_mainfile_get_description().
char* BLI_strdupcat | ( | const char *__restrict | str1, |
const char *__restrict | str2 | ||
) |
Appends the two strings, and returns new mallocN'ed string
str1 | first string for copy |
str2 | second string for append |
Returns | dst |
Definition at line 47 of file string.c.
References MEM_mallocN, and str.
Referenced by BLT_lang_locale_explode(), GPU_shader_create_from_python(), and replace_bbone_scale_rnapath().
char* BLI_strdupn | ( | const char * | str, |
size_t | len | ||
) |
Duplicates the first len bytes of cstring str into a newly mallocN'd string and returns it. str is assumed to be at least len bytes long.
str | The string to be duplicated |
len | The number of bytes to duplicate |
Returns | the duplicated string |
Definition at line 33 of file string.c.
References len, MEM_mallocN, and str.
Referenced by BKE_nlastrip_validate_fcurves(), BLI_file_read_as_lines(), BLI_strdup(), block_create__close_file_dialog(), BLT_lang_locale_explode(), BLT_lang_set(), console_lb_add__internal(), do_version_fcurve_hide_viewport_fix(), fsmenu_insert_entry(), ibJpegImageFromCinfo(), memiter_words10k_test(), blender::ed::space_node::node_errors_tooltip_fn(), TEST(), text_autocomplete_build(), txt_insert_buf(), ui_but_string_get_dynamic(), UI_but_string_info_get(), ui_number_from_string_factor(), ui_number_from_string_percentage(), and ui_textedit_begin().
bool BLI_string_all_words_matched | ( | const char * | name, |
const char * | str, | ||
int(*) | words[2], | ||
const int | words_len | ||
) |
Definition at line 576 of file string.c.
References BLI_string_has_word_prefix(), and str.
Referenced by operator_search_update_fn().
int BLI_string_find_split_words | ( | const char * | str, |
size_t | len, | ||
char | delim, | ||
int | r_words[][2], | ||
int | words_max | ||
) |
Find the ranges needed to split str into its individual words.
str | The string to search for words. |
len | Size of the string to search. |
delim | Character to use as a delimiter. |
r_words | Info about the words found. Set to [index, len] pairs. |
words_max | Max number of words to find |
Definition at line 1049 of file string.c.
Referenced by name_matches_dopesheet_filter(), operator_search_update_fn(), and StringFindSplitWords::testStringFindSplitWords().
bool BLI_string_has_word_prefix | ( | const char * | haystack, |
const char * | needle, | ||
size_t | needle_len | ||
) |
Definition at line 564 of file string.c.
References BLI_string_has_word_prefix(), and BLI_strncasestr().
Referenced by BLI_string_all_words_matched(), and BLI_string_has_word_prefix().
int BLI_string_max_possible_word_count | ( | const int | str_len | ) |
Definition at line 559 of file string.c.
Referenced by name_matches_dopesheet_filter(), operator_search_update_fn(), and TEST().
bool BLI_strn_endswith | ( | const char *__restrict | str, |
const char *__restrict | end, | ||
size_t | slength | ||
) |
Definition at line 871 of file string.c.
References str.
Referenced by BLI_str_endswith(), do_curve_mirror_flippping(), ui_number_from_string_factor(), ui_number_from_string_percentage(), and updateDuplicateActionConstraintSettings().
int BLI_strncasecmp | ( | const char * | s1, |
const char * | s2, | ||
size_t | len | ||
) |
Definition at line 646 of file string.c.
References len.
Referenced by BLI_strcasestr(), BLI_strncasestr(), texttool_suggest_add(), and texttool_suggest_prefix().
char* BLI_strncasestr | ( | const char * | s, |
const char * | find, | ||
size_t | len | ||
) |
Variation of BLI_strcasestr with string length limited to len
Definition at line 592 of file string.c.
References BLI_strncasecmp(), Freestyle::c, len, and NULL.
Referenced by BLI_string_has_word_prefix(), name_matches_dopesheet_filter(), and TEST().
char* BLI_strncpy | ( | char *__restrict | dst, |
const char *__restrict | src, | ||
size_t | maxncpy | ||
) |
Like strncpy but ensures dst is always '\0' terminated.
dst | Destination for copy |
src | Source string to copy |
maxncpy | Maximum number of characters to copy (generally the size of dst) |
Returns | dst |
Definition at line 64 of file string.c.
References BLI_assert, BLI_strnlen(), and src.
Referenced by ABC_export(), ABC_import(), absolute_convert_foreach_path_cb(), acf_filldrivers_name(), acf_generic_idblock_name(), acf_gpl_name(), acf_group_name(), acf_masklay_name(), acf_nla_controls_name(), acf_nlaaction_name(), acf_nlatrack_name(), acf_object_name(), acf_shapekey_name(), acf_summary_name(), action_groups_add_new(), AnimationImporter::add_bone_fcurve(), blender::io::usd::USDGeomReader::add_cache_modifier(), add_driver_with_target(), add_hook_object(), add_new_constraint_internal(), blender::io::alembic::AbcObjectReader::addCacheModifier(), addMatrixSpace(), ANIM_add_driver(), ANIM_channel_debug_print_info(), ANIM_copy_as_driver(), anim_getnew(), ANIM_keyingset_info_register(), blender::io::obj::append_frame_to_filename(), AnimationImporter::apply_matrix_curves(), applyTransformOrientation(), arg_handle_load_file(), arg_handle_output_set(), arg_handle_python_file_run(), armature_autoside_names_exec(), armature_extrude_exec(), asset_metadata_tag_add(), AnimationImporter::Assign_color_animations(), AnimationImporter::Assign_float_animations(), AnimationImporter::Assign_lens_animations(), AnimationImporter::Assign_transform_animations(), blender::ed::space_node::attribute_search_exec_fn(), BKE_addon_ensure(), BKE_appdir_folder_documents(), BKE_appdir_font_folder_default(), BKE_asset_library_find_suitable_root_path_from_path(), BKE_blendfile_append(), BKE_blendfile_link_append_context_item_add(), BKE_blendfile_link_append_context_library_add(), BKE_bpath_foreach_path_allocated_process(), BKE_bpath_foreach_path_dirfile_fixed_process(), BKE_bpath_foreach_path_fixed_process(), BKE_cachefile_add_layer(), BKE_cachefile_eval(), BKE_cachefile_filepath_get(), BKE_collection_new_name_get(), BKE_color_managed_colorspace_settings_copy(), BKE_color_managed_colorspace_settings_init(), BKE_color_managed_display_settings_copy(), BKE_color_managed_display_settings_init(), BKE_color_managed_view_settings_copy(), BKE_constraint_targets_flush(), BKE_cryptomatte_find_name(), BKE_curve_init(), BKE_fluid_modifier_copy(), BKE_freestyle_lineset_add(), BKE_gpencil_layer_addnew(), BKE_gpencil_layer_copy_settings(), BKE_gpencil_layer_mask_add(), BKE_gpencil_modifier_new(), BKE_gpencil_palette_addnew(), BKE_gpencil_palettecolor_addnew(), BKE_id_attribute_calc_unique_name(), BKE_id_new_name_validate(), BKE_image_add_renderslot(), BKE_image_add_tile(), BKE_image_ensure_tile_token(), BKE_image_get_tile_label(), BKE_image_render_write_exr(), BKE_image_save_options_init(), BKE_image_signal(), BKE_image_user_file_path_ex(), BKE_keyblock_add(), BKE_keyblock_copy_settings(), BKE_keyingset_add(), BKE_keyingset_add_path(), BKE_lib_override_library_update(), BKE_libblock_alloc(), BKE_libblock_copy_ex(), BKE_library_filepath_set(), BKE_lightgroup_membership_get(), BKE_lightgroup_membership_set(), BKE_main_library_weak_reference_add_item(), BKE_main_namemap_get_name(), BKE_main_namemap_remove_name(), BKE_mask_layer_copy(), BKE_mask_layer_new(), BKE_mask_layer_rename(), BKE_mask_new(), BKE_memfile_undo_decode(), BKE_memfile_undo_encode(), BKE_modifier_copy_ex(), BKE_movieclip_file_add(), BKE_movieclip_file_add_exists_ex(), BKE_movieclip_filename_for_frame(), BKE_nla_action_stash(), BKE_nlastrip_validate_name(), BKE_node_clipboard_add_node(), BKE_object_copy_gpencil_modifier(), BKE_object_copy_modifier(), BKE_object_defgroup_new(), BKE_object_facemap_add_name(), BKE_object_modifier_stack_copy(), BKE_object_workob_calc_parent(), BKE_packedfile_compare_to_file(), BKE_packedfile_new(), BKE_packedfile_unpack_image(), BKE_packedfile_unpack_sound(), BKE_packedfile_unpack_to_file(), BKE_packedfile_unpack_vfont(), BKE_packedfile_unpack_volume(), BKE_pose_add_group(), BKE_pose_channel_ensure(), BKE_preferences_asset_library_add(), BKE_preferences_asset_library_path_set(), BKE_ptcache_disk_cache_rename(), BKE_ptcache_id_clear(), BKE_ptcache_load_external(), BKE_ptcache_update_info(), BKE_scene_add_render_view(), BKE_scene_disable_color_management(), BKE_scene_multiview_filepath_get(), BKE_scene_multiview_view_filepath_get(), BKE_scene_multiview_view_prefix_get(), BKE_shaderfx_new(), BKE_sim_debug_data_add_element(), BKE_sound_new_file(), BKE_sound_new_file_exists_ex(), BKE_studiolight_init(), BKE_text_file_modified_check(), BKE_text_file_modified_ignore(), BKE_text_load_ex(), BKE_text_reload(), BKE_tracking_get_rna_path_prefix_for_plane_track(), BKE_tracking_get_rna_path_prefix_for_track(), BKE_tracking_object_add(), BKE_tracking_reconstruction_check(), BKE_tracking_reconstruction_context_new(), BKE_tracking_reconstruction_report_error_message(), BKE_undosys_step_push_init_with_type(), BKE_undosys_step_push_with_type(), BKE_vfont_load(), BKE_vfont_load_exists_ex(), BKE_view_layer_add_aov(), BKE_view_layer_add_lightgroup(), BKE_view_layer_rename(), BKE_volume_load(), BKE_volume_set_velocity_grid_by_name(), blendfile_library_relocate_remap(), bli_builddir(), BLI_dir_create_recursive(), BLI_filelist_entry_mode_to_string(), BLI_filelist_entry_owner_to_string(), BLI_hostname_get(), BLI_join_dirfile(), BLI_make_file_string(), BLI_path_abs(), BLI_path_abs_from_cwd(), BLI_path_append(), BLI_path_cmp_normalized(), BLI_path_contains(), BLI_path_extension_check_glob(), BLI_path_frame(), BLI_path_frame_range(), BLI_path_frame_strip(), BLI_path_program_search(), BLI_path_rel(), BLI_path_sequence_decode(), BLI_path_suffix(), BLI_path_to_display_name(), BLI_split_dirfile(), BLI_str_format_byte_unit(), BLI_str_replace_table_exact(), BLI_string_flip_side_name(), BLI_string_split_prefix(), BLI_string_split_suffix(), BLI_uniquename_cb(), blo_do_versions_260(), blo_do_versions_270(), blo_do_versions_280(), blo_do_versions_290(), blo_do_versions_300(), blo_filedata_from_file(), blo_find_main(), BLO_read_from_memfile(), blo_update_defaults_scene(), BLO_update_defaults_startup_blend(), BMO_op_vinitf(), boid_new_rule(), bone_autoside_name(), bone_mouse_select_menu(), bookmark_select_exec(), bpath_list_append(), bpath_list_restore(), bpy_lib_enter(), bpy_lib_load(), bpy_lib_write(), bpyunits_to_value(), brush_add_gpencil_exec(), build_pict_list_ex(), cache_file_init_data(), cachefile_layer_open_invoke(), cachefile_open_exec(), cachefile_open_invoke(), calculatePropRatio(), cdf_layer_add(), blender::bke::tests::change_name(), change_node_socket_name(), cmp_node_image_add_pass_output(), colormanage_check_colorspace_settings(), colormanage_check_display_settings(), colormanage_check_view_settings(), colormanage_colorspace_add(), colormanage_display_add(), colormanage_load_config(), colormanage_look_add(), colormanage_role_color_space_name_get(), colormanage_view_add(), colorspace_set_default_role(), constraint_bone_name_fix(), blender::io::usd::USDMaterialReader::convert_usd_primvar_reader_float2(), blender::io::alembic::create_archive(), create_placeholder(), CTX_store_add(), curve_calc_modifiers_post(), customData_add_layer__internal(), CustomData_external_add(), customdata_external_filename(), CustomData_set_layer_name(), CustomData_validate_layer_name(), depthdropper_depth_sample_pt(), detect_clip_source(), direct_link_library(), do_makepicstring(), do_version_constraints_245(), do_versions(), do_versions_compositor_render_passes_storage(), do_versions_node_group_add_socket_2_56_2(), do_versions_nodetree_customnodes(), do_versions_nodetree_file_output_layers_2_64_5(), do_versions_nodetree_multi_file_output_format_2_62_1(), do_versions_nodetree_multi_file_output_path_2_63_1(), do_versions_rename_id(), do_write_image_or_movie(), draw_marker_texts(), draw_movieclip_notes(), draw_seq_text_get_source(), drivers_path_rename_fix(), drw_attributes_add_request(), DRW_draw_region_engine_info(), DRW_pass_create(), DRW_shader_library_add_file(), DRW_stats_draw(), drw_stats_timer_start_ex(), duplicateEditBoneObjects(), dynamicPaint_bakeImageSequence(), dynamicPaint_Modifier_copy(), dynamicPaint_outputSurfaceImage(), dynamicPaintSurface_setUniqueName(), dynamicPaintSurface_updateType(), ED_area_status_text(), ED_armature_bone_rename(), ED_armature_bones_flip_names(), ED_armature_ebone_add(), ED_armature_from_edit(), ED_armature_join_objects_exec(), ED_buttons_search_string_set(), ED_file_change_dir_ex(), ED_fsmenu_entry_set_name(), ED_gpencil_anim_copybuf_copy(), ED_image_filesel_detect_sequences(), ed_marker_duplicate_apply(), ED_node_set_tree_type(), ED_node_tree_push(), ED_node_tree_start(), ED_object_parent(), ED_object_parent_set(), ED_object_shaderfx_copy(), ED_sequencer_select_sequence_single(), ED_workspace_status_text(), EEVEE_lightcache_info_update(), blender::io::obj::export_frame(), external_draw_scene_do_v3d(), blender::draw::extract_tan_init_common(), eyedropper_gpencil_status_indicators(), fcurve_add_to_list(), fcurves_path_rename_fix(), file_browse_exec(), file_directory_enter_handle(), file_directory_new_exec(), file_draw_string(), file_expand_directory(), file_filename_enter_handle(), file_panel_operator_header(), file_path_to_ui_path(), file_rename_state_activate(), file_select_do(), file_select_match(), file_sfile_filepath_set(), filelist_asset_library_path(), filelist_cache_previews_push(), filelist_get_details_column_string(), filelist_readjob_recursive_dir_add_items(), filelist_readjob_start(), filelist_setdir(), filelist_setfilter_options(), filenum_newname(), blender::io::gpencil::GpencilIO::filepath_set(), fileselect_ensure_updated_file_params(), fileselect_file_set(), fileselect_initialize_params_common(), fileselect_refresh_asset_params(), find_bhead_from_code_name(), fix_relpaths_library(), flip_names(), fluid_bake_sequence(), fluid_initjob(), fluid_validatepaths(), fmodifier_panel_register(), fmodifier_subpanel_register(), folderlist_popdir(), blender::gpu::FrameBuffer::FrameBuffer(), fsmenu_entry_generate_name(), fsmenu_insert_entry(), fsmenu_read_bookmarks(), gather_objects_paths(), blender::io::usd::gather_objects_paths(), generator_panel_draw(), blender::io::usd::get_absolute_path(), get_drag_path(), blender::io::obj::get_image_filepath(), get_index_dir(), get_path_system_ex(), get_path_user_ex(), get_proxy_fname(), get_sequence_fname(), blender::nodes::node_geo_string_to_curves_cc::get_text_layout(), Freestyle::StringUtils::getPathName(), Freestyle::BlenderStrokeRenderer::GetStrokeShader(), ghost_event_proc(), gpencil_duplicate_exec(), gpencil_duplicate_points(), gpencil_interpolate_status_indicators(), gpencil_modifier_panel_register(), gpencil_modifier_subpanel_register(), gpencil_primitive_status_indicators(), gpencil_strokes_copy_exec(), GPU_shader_create_info_check_error(), blender::compositor::DebugInfo::graphviz(), groupname_to_code(), hud_panel_operator_redo_draw_header(), icon_preview_imbuf_from_brush(), id_name_final_build(), IDP_AssignString(), idp_generic_copy(), IDP_NewIDPArray(), IDP_NewString(), idriver_to_cdriver(), image_file_browse_invoke(), image_foreach_path(), image_replace_exec(), image_save_post(), image_save_sequence_exec(), image_save_update_filepath(), image_sequence_get_frame_ranges(), IMB_anim_get_fname(), IMB_anim_set_index_dir(), imb_cache_filename(), IMB_colormanagement_check_file_config(), IMB_colormanagement_colorspace_from_ibuf_ftype(), IMB_colormanagement_init_default_view_settings(), IMB_colormanagement_validate_settings(), IMB_exr_add_channel(), IMB_exr_channel_rect(), IMB_exr_get_handle_name(), imb_exr_get_layer(), imb_exr_get_pass(), imb_exr_insert_view_name(), imb_exr_multilayer_parse_channels_from_file(), imb_exr_pass_name_from_channel(), IMB_exr_set_channel(), imb_exr_split_channel_name(), imb_handle_alpha(), IMB_ibImageFromFile(), IMB_ibImageFromMemory(), IMB_index_builder_create(), IMB_indexer_open(), imb_load_photoshop(), IMB_loadiffname(), IMB_metadata_get_field(), IMB_moviecache_create(), IMB_open_anim(), IMB_suffix_anim(), IMB_testiffname(), IMB_thumb_load_image(), blender::io::stl::importer_main(), blender::nodes::node_composite_planetrackdeform_cc::init(), blender::nodes::node_composite_trackpos_cc::init(), init_iconfile_list(), blender::ed::asset::index::init_indexer_entry_from_value(), blender::nodes::node_composite_output_file_cc::init_output_file(), init_text_effect(), initData(), initLaplacianSystem(), is_hidden_dot_filename(), joined_armature_fix_animdata_cb(), joined_armature_fix_links(), joined_armature_fix_links_constraints(), blender::nodes::node_composite_moviedistortion_cc::label(), layer_new_name_get(), lib_id_library_local_paths_callback(), lib_weak_key_create(), library_link_end(), load_data_init_from_operator(), Freestyle::Controller::LoadMesh(), M_imbuf_load(), main(), main_namemap_populate(), main_namemap_validate_and_fix(), make_boneList_recursive(), make_object_duplilist_real(), make_socket(), make_socket_interface(), make_socket_type_virtual(), make_standard_socket_type(), mask_parent_set_exec(), merged_element_search_fn_recursive(), mesh_calc_finalize(), mesh_new_from_mesh(), meshcache_do(), missing_files_find__recursive(), missing_files_find_foreach_path_cb(), ml_addlayer_cb(), ml_addpass_cb(), ml_addview_cb(), modifier_allocate_and_init(), modifier_panel_register(), modifier_subpanel_register(), blender::nodes::decl::modify_subtype_except_for_storage(), movieclip_open_anim_file(), namebutton_fn(), new_folder_path(), new_modifier(), node_blend_label(), blender::nodes::node_fn_boolean_math_cc::node_boolean_math_label(), blender::nodes::node_fn_compare_cc::node_compare_label(), blender::nodes::node_composite_keyingscreen_cc::node_composit_init_keyingscreen(), blender::nodes::node_composite_image_cc::node_composit_init_rlayers(), blender::ed::space_node::node_draw_space(), node_filter_label(), blender::ed::space_node::node_find_create_label(), blender::nodes::node_fn_float_to_int_cc::node_float_to_int_label(), blender::ed::space_node::node_geometry_add_attribute_search_button(), node_group_label(), node_image_label(), node_init(), blender::ed::space_node::node_link_update_header(), blender::nodes::node_composite_mask_cc::node_mask_label(), node_math_label(), node_sock_label(), node_socket_copy_default_value(), node_type_base(), node_type_base_custom(), node_type_socket_templates(), node_type_storage(), node_vector_math_label(), nodeAddNode(), nodeLabel(), nodeModifySocketType(), ntreeAddTree(), ntreeCompositCryptomatteLayerPrefix(), object_add_or_copy_particle_system(), object_copy_data(), object_mouse_select_menu(), object_speaker_add_exec(), open_invoke(), operator_search_update_fn(), outputNumInput(), blender::compositor::OutputOpenExrLayer::OutputOpenExrLayer(), blender::compositor::OutputOpenExrMultiLayerOperation::OutputOpenExrMultiLayerOperation(), blender::compositor::OutputSingleLayerOperation::OutputSingleLayerOperation(), blender::compositor::OutputStereoOperation::OutputStereoOperation(), panel_add_instanced(), blender::io::obj::OBJParser::parse(), particle_batch_cache_ensure_procedural_strand_data(), blender::io::path_reference(), pose_autoside_names_exec(), pose_bone_do_paste(), pose_clear_user_transforms_exec(), poselib_add_exec(), poselib_preview_apply(), poselib_preview_handle_event(), poselib_rename_exec(), preview_prepare_scene(), ptcache_frame_from_filename(), pyrna_py_to_prop(), RE_bake_engine(), RE_create_gp_pass(), RE_engine_render(), RE_engine_update_stats(), RE_NewRender(), RE_SetActiveRenderView(), read_global(), read_library_file_data(), blender::io::usd::USDXformReader::read_object_data(), register_undefined_types(), relative_convert_foreach_path_cb(), relative_rebase_foreach_path_cb(), renamebutton_cb(), render_layer_add_pass(), render_result_exr_file_cache_path(), render_result_new(), render_result_view_new(), render_result_views_shallowcopy(), blender::ed::space_node::reroute_node_draw(), return_editmesh_vgroup(), RNA_parameter_list_create(), RNA_property_string_get_default(), RNA_struct_state_owner_set(), save_image_op(), scene_init_data(), screen_opengl_views_setup(), screenshot_invoke(), sculpt_save_active_attribute(), sculpt_undo_alloc_node_type(), sculpt_undo_bmesh_push(), sculpt_undo_face_sets_push(), SCULPT_undo_push_node(), SEQ_add_image_load_file(), SEQ_add_image_set_directory(), SEQ_add_image_strip(), SEQ_add_load_data_init(), SEQ_add_movie_strip(), seq_disk_cache_add_file_to_list(), seq_disk_cache_add_header_entry(), seq_disk_cache_get_dir(), seq_disk_cache_get_files(), seq_disk_cache_get_project_dir(), seq_disk_cache_handle_versioning(), SEQ_edit_sequence_swap(), SEQ_modifier_new(), seq_open_anim_file(), seq_proxy_get_custom_file_fname(), seq_proxy_get_fname(), seq_proxy_index_dir_set(), SEQ_sequence_base_unique_name_recursive(), sequence_guess_offset(), sequencer_add_movie_multiple_strips(), sequencer_add_sound_multiple_strips(), sequencer_change_path_exec(), sequencer_export_subtitles_invoke(), sequencer_generic_invoke_path__internal(), sequencer_image_seq_reserve_frames(), sequencer_select_set_active(), sequencer_separate_images_exec(), set_constraint_nth_target(), BoneExtended::set_name(), blender::compositor::PlaneTrackCommon::set_plane_track_name(), blender::compositor::CompositorOperation::set_scene_name(), blender::compositor::TrackPositionOperation::set_track_name(), blender::compositor::PlaneTrackCommon::set_tracking_object(), blender::compositor::TrackPositionOperation::set_tracking_object(), blender::compositor::KeyingScreenOperation::set_tracking_object(), setAxisMatrixConstraint(), setConstraint(), setError(), setNearestAxis2d(), blender::ed::asset::AssetList::setup(), blender::io::alembic::AbcObjectReader::setupObjectTransform(), blender::gpu::Shader::Shader(), shaderfx_copy_exec(), shaderfx_panel_register(), shaderfx_subpanel_register(), shapekey_adrcodes_to_paths(), smooth_brush_toggle_on(), solve_camera_invoke(), solve_camera_updatejob(), sound_mixdown_exec(), split_groups_action_temp(), blender::gpu::StorageBuf::StorageBuf(), studiolight_add_file(), surface_setUniqueOutputName(), tempdir_session_create(), blender::bke::cryptomatte::tests::TEST(), blender::bke::id::remapper::tests::TEST(), TEST(), blender::bke::tests::TEST(), test_env_path(), blender::bke::tests::TEST_F(), blender::bke::tests::test_render_pass_conflict(), text_find_set_selected_exec(), text_replace_set_selected_exec(), ExtraHandler::textData(), blender::gpu::Texture::Texture(), tracking_dopesheet_channels_calc(), tracks_map_new(), transform_orientations_current_set(), transformcache_copy(), AnimationImporter::translate_animation_OLD(), txt_write_file(), ubuf_from_image_no_tiles(), ui_apply_but_undo(), UI_autocomplete_end(), UI_autocomplete_update_name(), UI_block_begin(), ui_but_anim_expression_get(), ui_but_copy_operator(), ui_but_string_get_ex(), ui_but_string_set(), ui_but_text_password_hide(), ui_but_update_ex(), ui_but_update_old_active_from_new(), ui_draw_menu_item(), ui_draw_preview_item_stateless(), ui_imageuser_slot_menu(), ui_list_ensure(), blender::ed::space_node::ui_node_menu_column(), blender::ed::space_node::ui_node_sock_name(), UI_panel_begin(), ui_panel_category_active_set(), UI_panel_category_add(), ui_pie_menu_level_create(), UI_popup_menu_reports(), UI_search_item_add(), ui_searchbox_apply(), ui_style_new(), ui_textedit_copypaste(), ui_textedit_string_set(), UI_UL_asset_view(), UI_UL_cache_file_layers(), uiblock_layer_pass_buttons(), uiItemMenuEnumFullO_ptr(), uiItemMenuEnumR_prop(), uilist_filter_items_default(), uiStyleInit(), uiTemplateComponentMenu(), uiTemplatePreview(), uiTemplateTextureUser(), undosys_id_ref_store(), blender::gpu::UniformBuf::UniformBuf(), unique_name(), unpack_all_invoke(), unpack_generate_paths(), updateDuplicateSubtarget(), uri_from_filename(), USD_export(), USD_import(), user_string_to_number(), version_switch_node_input_prefix(), vfont_init_data(), vgroup_duplicate(), vgroup_init_remap(), view_lock_to_active_exec(), visit_object(), volume_init_data(), weightvg_do_mask(), what_does_obaction(), where_am_i(), where_is_temp(), WM_drag_create_asset_data(), WM_drag_data_create(), WM_dropboxmap_find(), wm_homefile_read_ex(), WM_init(), WM_jobs_get(), WM_keyconfig_new(), WM_keyconfig_remove(), WM_keyconfig_set_active(), WM_keymap_add_item(), WM_keymap_item_restore_to_default(), wm_keymap_new(), wm_lib_relocate_exec_do(), wm_link_append_exec(), wm_main_playanim_intern(), WM_modalkeymap_add_item_str(), wm_open_mainfile_description(), wm_operator_create(), WM_operatortype_macro_define(), wm_revert_mainfile_exec(), WM_xr_actionmap_binding_ensure_unique(), WM_xr_actionmap_binding_new(), WM_xr_actionmap_ensure_unique(), WM_xr_actionmap_item_ensure_unique(), WM_xr_actionmap_item_new(), WM_xr_actionmap_new(), workspace_layout_name_set(), blender::io::gpencil::GpencilExporterPDF::write(), blender::io::gpencil::GpencilExporterSVG::write(), write_crash_blend(), write_global(), and write_renderinfo().
char* BLI_strncpy_ensure_pad | ( | char *__restrict | dst, |
const char *__restrict | src, | ||
char | pad, | ||
size_t | maxncpy | ||
) |
Like BLI_strncpy but ensures dst is always padded by given char, on both sides (unless src is empty).
dst | Destination for copy |
src | Source string to copy |
pad | the char to use for padding |
maxncpy | Maximum number of characters to copy (generally the size of dst) |
Returns | dst |
Definition at line 78 of file string.c.
References BLI_assert, BLI_strnlen(), pad, and src.
Referenced by filelist_setfilter_options(), outliner_filter_tree(), and uilist_filter_items_default().
size_t BLI_strncpy_rlen | ( | char *__restrict | dst, |
const char *__restrict | src, | ||
size_t | maxncpy | ||
) |
Like strncpy but ensures dst is always '\0' terminated.
dst | Destination for copy |
src | Source string to copy |
maxncpy | Maximum number of characters to copy (generally the size of dst) |
The | number of bytes copied (The only difference from BLI_strncpy). |
Definition at line 120 of file string.c.
References BLI_assert, BLI_strnlen(), and src.
Referenced by applyEdgeSlide(), applyShrinkFatten(), applyVertSlide(), BKE_unit_name_to_alt(), BLI_path_extension_check_glob(), BLI_path_join(), BLI_path_rel(), BLI_string_flip_side_name(), event_ids_from_flag(), get_stats_string(), get_thumb_dir(), headerTranslation(), IMB_thumb_load_font_get_hash(), nla_draw_strip_text(), scene_undo_depsgraph_gen_key(), ui_but_drawstr_without_sep_char(), ui_searchbox_region_draw_cb__operator(), uiTemplateImageInfo(), uiTemplateMovieclipInformation(), unpack_generate_paths(), WM_operator_bl_idname(), and WM_operator_py_idname().
size_t BLI_strnlen | ( | const char * | str, |
size_t | maxlen | ||
) |
Determine the length of a fixed-size string.
Definition at line 899 of file string.c.
References len.
Referenced by blender::bke::cryptomatte::CryptomatteLayer::add_ID(), BKE_cryptomatte_entries_to_matte_id(), blf_dir_metrics_search(), blf_font_width_to_rstrlen(), BLI_current_working_dir(), BLI_dynstr_nappend(), BLI_join_dirfile(), BLI_make_file_string(), BLI_path_append(), BLI_path_is_abs_from_cwd(), BLI_path_rel(), BLI_path_slash_native(), BLI_string_flip_side_name(), BLI_string_split_prefix(), BLI_string_split_suffix(), BLI_strncpy(), BLI_strncpy_ensure_pad(), BLI_strncpy_rlen(), blender::compositor::combined_layer_pass_name(), blender::compositor::OutputOpenExrMultiLayerOperation::create_stamp_data(), cryptomatte_determine_name(), ED_buttons_search_string_length(), eyedropper_cryptomatte_sample_renderlayer_fl(), blender::compositor::MultilayerColorOperation::get_meta_data(), blender::compositor::RenderLayersProg::get_meta_data(), blender::compositor::ConvertColorSpaceOperation::init_execution(), blender::ed::asset::index::init_user_data(), blender::compositor::prefix_from_node(), WM_xr_actionmap_binding_ensure_unique(), WM_xr_actionmap_ensure_unique(), and WM_xr_actionmap_item_ensure_unique().
char BLI_tolower_ascii | ( | const char | c | ) |
Definition at line 917 of file string.c.
References Freestyle::c.
Referenced by BLI_str_tolower_ascii().
char BLI_toupper_ascii | ( | const char | c | ) |
Definition at line 922 of file string.c.
References Freestyle::c.
Referenced by BLI_str_toupper_ascii(), brush_add_gpencil_exec(), and imb_exr_split_channel_name().
size_t BLI_vsnprintf | ( | char *__restrict | buffer, |
size_t | maxncpy, | ||
const char *__restrict | format, | ||
va_list | arg | ||
) |
Definition at line 147 of file string.c.
References BLI_assert, buffer, and NULL.
Referenced by BLI_snprintf().
size_t BLI_vsnprintf_rlen | ( | char *__restrict | buffer, |
size_t | maxncpy, | ||
const char *__restrict | format, | ||
va_list | arg | ||
) |
Definition at line 170 of file string.c.
References BLI_assert, buffer, and NULL.
Referenced by BLI_snprintf_rlen().
|
static |
Definition at line 670 of file string.c.
Referenced by BLI_strcasecmp_natural().
BLI_INLINE bool str_unescape_pair | ( | char | c_next, |
char * | r_out | ||
) |
Definition at line 280 of file string.c.
References CASE_PAIR.
Referenced by BLI_str_unescape(), and BLI_str_unescape_ex().