Blender  V3.3
Macros | Functions
string.h File Reference
#include <sstream>
#include <string.h>
#include <string>
#include <OpenImageIO/string_view.h>
#include "util/vector.h"

Go to the source code of this file.

Macros

#define PRINTF_ATTRIBUTE
 

Functions

string string_printf (const char *format,...) PRINTF_ATTRIBUTE
 
bool string_iequals (const string &a, const string &b)
 
void string_split (vector< string > &tokens, const string &str, const string &separators="\t ", bool skip_empty_tokens=true)
 
void string_replace (string &haystack, const string &needle, const string &other)
 
void string_replace_same_length (string &haystack, const string &needle, const string &other)
 
bool string_startswith (string_view s, string_view start)
 
bool string_endswith (string_view s, string_view end)
 
string string_strip (const string &s)
 
string string_remove_trademark (const string &s)
 
string string_from_bool (const 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)
 

Macro Definition Documentation

◆ PRINTF_ATTRIBUTE

#define PRINTF_ATTRIBUTE

Definition at line 30 of file string.h.

Function Documentation

◆ string_endswith()

bool string_endswith ( string_view  s,
string_view  end 
)

◆ string_from_bool()

string string_from_bool ( const bool  var)

Definition at line 167 of file string.cpp.

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

◆ string_human_readable_number()

string string_human_readable_number ( size_t  num)

◆ string_human_readable_size()

string string_human_readable_size ( size_t  size)

◆ string_iequals()

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

◆ string_printf()

string string_printf ( const char *  format,
  ... 
)

◆ string_remove_trademark()

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().

◆ 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 139 of file string.cpp.

References pos.

◆ string_split()

void string_split ( vector< string > &  tokens,
const string &  str,
const string &  separators = "\t ",
bool  skip_empty_tokens = true 
)

◆ string_startswith()

bool string_startswith ( string_view  s,
string_view  start 
)

◆ string_strip()

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_to_lower()

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().

◆ to_string() [1/2]

string to_string ( const char *  str)

Definition at line 175 of file string.cpp.

References str.

◆ to_string() [2/2]

string to_string ( const float4 v)

Definition at line 180 of file string.cpp.

References string_printf(), and v.