Flecs v4.0
A fast entity component system (ECS) for C & C++
Loading...
Searching...
No Matches
flecs::string Struct Reference
Inheritance diagram for flecs::string:
[legend]

Public Member Functions

 string (char *str)
 
 string (string &&str) noexcept
 
 operator const char * () const
 
stringoperator= (string &&str) noexcept
 
stringoperator= (const string &str)=delete
 
 string (const string &str)=delete
 
bool operator== (const flecs::string &str) const
 
bool operator!= (const flecs::string &str) const
 
bool operator== (const char *str) const
 
bool operator!= (const char *str) const
 
const char * c_str () const
 
std::size_t length () const
 
std::size_t size () const
 
void clear ()
 
bool contains (const char *substr)
 

Static Public Member Functions

template<size_t N>
static constexpr size_t length (char const (&)[N])
 

Protected Member Functions

 string (const char *str)
 

Protected Attributes

char * str_ = nullptr
 
const char * const_str_
 
ecs_size_t length_
 

Detailed Description

Definition at line 13 of file string.hpp.

Constructor & Destructor Documentation

◆ string() [1/4]

flecs::string::string ( )
inlineexplicit

Definition at line 14 of file string.hpp.

◆ string() [2/4]

flecs::string::string ( char * str)
inlineexplicit

Definition at line 19 of file string.hpp.

◆ ~string()

flecs::string::~string ( )
inline

Definition at line 24 of file string.hpp.

◆ string() [3/4]

flecs::string::string ( string && str)
inlinenoexcept

Definition at line 34 of file string.hpp.

◆ string() [4/4]

flecs::string::string ( const char * str)
inlineprotected

Definition at line 132 of file string.hpp.

Member Function Documentation

◆ c_str()

const char * flecs::string::c_str ( ) const
inline

Definition at line 95 of file string.hpp.

◆ clear()

void flecs::string::clear ( )
inline

Definition at line 112 of file string.hpp.

◆ contains()

bool flecs::string::contains ( const char * substr)
inline

Definition at line 118 of file string.hpp.

◆ length() [1/2]

std::size_t flecs::string::length ( ) const
inline

Definition at line 99 of file string.hpp.

◆ length() [2/2]

template<size_t N>
static constexpr size_t flecs::string::length ( char const(&)[N])
inlinestaticconstexpr

Definition at line 104 of file string.hpp.

◆ operator const char *()

flecs::string::operator const char * ( ) const
inline

Definition at line 42 of file string.hpp.

◆ operator!=() [1/2]

bool flecs::string::operator!= ( const char * str) const
inline

Definition at line 91 of file string.hpp.

◆ operator!=() [2/2]

bool flecs::string::operator!= ( const flecs::string & str) const
inline

Definition at line 75 of file string.hpp.

◆ operator=()

string & flecs::string::operator= ( string && str)
inlinenoexcept

Definition at line 46 of file string.hpp.

◆ operator==() [1/2]

bool flecs::string::operator== ( const char * str) const
inline

Definition at line 79 of file string.hpp.

◆ operator==() [2/2]

bool flecs::string::operator== ( const flecs::string & str) const
inline

Definition at line 59 of file string.hpp.

◆ size()

std::size_t flecs::string::size ( ) const
inline

Definition at line 108 of file string.hpp.

Member Data Documentation

◆ const_str_

const char* flecs::string::const_str_
protected

Definition at line 138 of file string.hpp.

◆ length_

ecs_size_t flecs::string::length_
protected

Definition at line 139 of file string.hpp.

◆ str_

char* flecs::string::str_ = nullptr
protected

Definition at line 137 of file string.hpp.


The documentation for this struct was generated from the following file: