Blender V4.3
string.cpp File Reference
#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)
 

Function Documentation

◆ string_endswith()

◆ string_from_bool()

string string_from_bool ( bool var)

Definition at line 170 of file string.cpp.

Referenced by RenderScheduler::full_report(), log_kernel_features(), and operator<<().

◆ string_human_readable_number()

◆ string_human_readable_size()

◆ string_iequals()

bool string_iequals ( const string & a,
const string & b )

Definition at line 55 of file string.cpp.

References b.

Referenced by TEST(), TEST(), TEST(), TEST(), xml_equal_string(), xml_read_boolean(), xml_read_scene(), and xml_read_shader_graph().

◆ string_printf()

◆ string_remove_trademark()

string string_remove_trademark ( const string & s)

Definition at line 155 of file string.cpp.

References string_replace(), and string_strip().

Referenced by system_cpu_brand_string(), TEST(), TEST(), TEST(), TEST(), TEST(), TEST(), TEST(), TEST(), TEST(), TEST(), and TEST().

◆ string_replace()

void string_replace ( string & haystack,
const string & needle,
const string & other )

◆ string_replace_same_length()

void string_replace_same_length ( string & haystack,
const string & needle,
const string & other )

Definition at line 142 of file string.cpp.

References pos.

◆ string_split()

void string_split ( vector< string > & tokens,
const string & str,
const string & separators,
bool skip_empty_tokens )

◆ string_startswith()

bool string_startswith ( const string_view s,
const string_view start )

◆ string_strip()

string string_strip ( const string & s)

Definition at line 125 of file string.cpp.

References result.

Referenced by path_source_handle_preprocessor(), string_remove_trademark(), TEST(), TEST(), TEST(), and TEST().

◆ string_to_lower()

string string_to_lower ( const string & s)

Definition at line 190 of file string.cpp.

Referenced by BlenderViewportParameters::BlenderViewportParameters(), and scene_init().

◆ to_string() [1/2]

string to_string ( const char * str)

Definition at line 180 of file string.cpp.

References str.

◆ to_string() [2/2]

string to_string ( const float4 & v)

Definition at line 185 of file string.cpp.

References string_printf(), and v.