Blender
V3.3
|
#include <stdarg.h>
#include <stdio.h>
#include <algorithm>
#include <cctype>
#include "util/foreach.h"
#include "util/string.h"
#include "util/windows.h"
Go to the source code of this file.
Functions | |
CCL_NAMESPACE_BEGIN string | string_printf (const char *format,...) |
bool | string_iequals (const string &a, const string &b) |
void | string_split (vector< string > &tokens, const string &str, const string &separators, bool skip_empty_tokens) |
bool | string_startswith (const string_view s, const string_view start) |
bool | string_endswith (const string_view s, const string_view end) |
string | string_strip (const string &s) |
void | string_replace (string &haystack, const string &needle, const string &other) |
void | string_replace_same_length (string &haystack, const string &needle, const string &other) |
string | string_remove_trademark (const string &s) |
string | string_from_bool (bool var) |
string | to_string (const char *str) |
string | to_string (const float4 &v) |
string | string_to_lower (const string &s) |
string | string_human_readable_size (size_t size) |
string | string_human_readable_number (size_t num) |
bool string_endswith | ( | const string_view | s, |
const string_view | end | ||
) |
Definition at line 111 of file string.cpp.
References len.
Referenced by ImageTextureNode::attributes(), EnvironmentTextureNode::attributes(), node_find_input_by_name(), parse_channels(), scene_init(), set_device_override_func(), and TEST().
string string_from_bool | ( | bool | var | ) |
Definition at line 167 of file string.cpp.
Referenced by RenderScheduler::full_report(), log_kernel_features(), and operator<<().
string string_human_readable_number | ( | size_t | num | ) |
Definition at line 248 of file string.cpp.
Referenced by Scene::device_update(), TileManager::finish_write_tiles(), NamedSizeStats::full_report(), CPUDevice::global_alloc(), CPUDevice::mem_alloc(), BVHBuild::run(), and CPUDevice::tex_alloc().
string string_human_readable_size | ( | size_t | size | ) |
Definition at line 229 of file string.cpp.
References r, size(), and string_printf().
Referenced by PathTraceWorkGPU::alloc_integrator_soa(), Scene::device_update(), NamedSizeStats::full_report(), CPUDevice::global_alloc(), CPUDevice::mem_alloc(), and CPUDevice::tex_alloc().
bool string_iequals | ( | const string & | a, |
const string & | b | ||
) |
Definition at line 54 of file string.cpp.
References Freestyle::a, and usdtokens::b().
Referenced by TEST(), xml_equal_string(), xml_read_boolean(), xml_read_scene(), and xml_read_shader_graph().
CCL_NAMESPACE_BEGIN string string_printf | ( | const char * | format, |
... | |||
) |
Definition at line 22 of file string.cpp.
Referenced by add_cryptomatte_layer(), ImageManager::add_image(), BlenderSession::bake(), buffer_params_from_image_spec_atttributes(), buffer_params_to_image_spec_atttributes(), Geometry::compute_bvh(), GeometryManager::create_volume_mesh(), device_cuda_info(), device_hip_info(), GeometryManager::displace(), exr_channel_names_for_passes(), RenderScheduler::full_report(), SVMCompiler::Summary::full_report(), TaskPool::Summary::full_report(), NamedSizeStats::full_report(), NamedTimeStats::full_report(), NamedSampleCountStats::full_report(), NamedNestedSampleStats::full_report(), ObjectManager::get_cryptomatte_assets(), ShaderManager::get_cryptomatte_materials(), ObjectManager::get_cryptomatte_objects(), lookup_instance_property(), DenoiseImage::parse_channels(), parse_channels(), BVHBuild::progress_update(), DenoiseImage::save_output(), session_print_status(), string_human_readable_size(), BlenderSync::sync_render_passes(), TEST(), time_human_readable_from_seconds(), to_string(), Hair::update_shadow_transparency(), BlenderSession::update_status_progress(), Session::update_status_time(), OIIOOutputDriver::write_render_tile(), and xml_write_node().
string string_remove_trademark | ( | const string & | s | ) |
Definition at line 152 of file string.cpp.
References result, string_replace(), and string_strip().
Referenced by system_cpu_brand_string(), and TEST().
void string_replace | ( | string & | haystack, |
const string & | needle, | ||
const string & | other | ||
) |
Definition at line 130 of file string.cpp.
Referenced by ImageManager::add_image(), node_find_input_by_name(), path_escape(), string_remove_trademark(), and TEST().
void string_replace_same_length | ( | string & | haystack, |
const string & | needle, | ||
const string & | other | ||
) |
Definition at line 139 of file string.cpp.
References pos.
void string_split | ( | vector< string > & | tokens, |
const string & | str, | ||
const string & | separators, | ||
bool | skip_empty_tokens | ||
) |
Definition at line 67 of file string.cpp.
References str.
Referenced by CCL_NAMESPACE_BEGIN::ShaderGraphBuilder::add_connection(), TEST(), time_human_readable_to_seconds(), xml_read_float_array(), xml_read_int_array(), xml_read_node(), and xml_read_shader_graph().
bool string_startswith | ( | const string_view | s, |
const string_view | start | ||
) |
Definition at line 100 of file string.cpp.
References len.
Referenced by get_blender_pass_type(), node_find_input_by_name(), parse_channel_operation(), parse_channels(), path_cache_clear_except(), and TEST().
string string_strip | ( | const string & | s | ) |
Definition at line 122 of file string.cpp.
References result.
Referenced by path_source_handle_preprocessor(), string_remove_trademark(), and TEST().
string string_to_lower | ( | const string & | s | ) |
Definition at line 185 of file string.cpp.
References Freestyle::c, r, and transform().
Referenced by BlenderViewportParameters::BlenderViewportParameters(), and scene_init().
string to_string | ( | const char * | str | ) |
Definition at line 175 of file string.cpp.
References str.
string to_string | ( | const float4 & | v | ) |
Definition at line 180 of file string.cpp.
References string_printf(), and v.