MyGUI 3.5.3
MyGUI::utility Namespace Reference

Namespaces

namespace  templates

Functions

std::filesystem::path toPath (std::string_view text)
 Convert UTF-8 bytes to a native filesystem path.
std::filesystem::path toPath (const char *text)
 Convert null-terminated UTF-8 bytes to a native filesystem path.
std::filesystem::path toPath (const std::string &text)
 Convert UTF-8 bytes to a native filesystem path.
std::filesystem::path toPath (const UString &text)
 Convert Unicode text to a native filesystem path.
std::string toUtf8 (const std::filesystem::path &path)
 Convert a filesystem path to UTF-8 bytes.
template<typename T>
__attribute__((visibility("default"))) void trim(std std::string toString (T _value)
template<>
template __attribute__((visibility("default"))) std template __attribute__((visibility("default"))) std template __attribute__((visibility("default"))) std __attribute__((visibility("default"))) const std std::string toString (std::string_view _value)
template<typename... Args>
std::string toString (Args &&... args)
template<>
std::string toString< bool > (bool _value)
template<typename T>
T parseValue (std::string_view value)
template<>
template __attribute__((visibility("default"))) int parseValue< int >(std template __attribute__((visibility("default"))) size_t parseValue< size_t >(std template __attribute__((visibility("default"))) float parseValue< float >(std template __attribute__((visibility("default"))) types template __attribute__((visibility("default"))) types template __attribute__((visibility("default"))) types template __attribute__((visibility("default"))) types template __attribute__((visibility("default"))) types template __attribute__((visibility("default"))) types template __attribute__((visibility("default"))) types bool parseValue (std::string_view _value)
template<>
char parseValue (std::string_view _value)
template<>
unsigned char parseValue (std::string_view _value)
template<typename... Args>
__attribute__((visibility("default"))) int parseInt(std __attribute__((visibility("default"))) unsigned int parseUInt(std __attribute__((visibility("default"))) size_t parseSizeT(std __attribute__((visibility("default"))) float parseFloat(std __attribute__((visibility("default"))) double parseDouble(std __attribute__((visibility("default"))) bool parseBool(std __attribute__((visibility("default"))) std bool parseComplex (std::string_view _value, Args &... args)
template<>
bool parseComplex< bool > (std::string_view _value, bool &arg)
template MYGUI_EXPORT std::string toString< int > (int)
template MYGUI_EXPORT std::string toString< size_t > (size_t)
template MYGUI_EXPORT std::string toString< float > (float)
template MYGUI_EXPORT int parseValue< int > (std::string_view)
template MYGUI_EXPORT size_t parseValue< size_t > (std::string_view)
template MYGUI_EXPORT float parseValue< float > (std::string_view)
template MYGUI_EXPORT types::TPoint< int > parseValue< types::TPoint< int > > (std::string_view)
template MYGUI_EXPORT types::TPoint< float > parseValue< types::TPoint< float > > (std::string_view)
template MYGUI_EXPORT types::TSize< int > parseValue< types::TSize< int > > (std::string_view)
template MYGUI_EXPORT types::TSize< float > parseValue< types::TSize< float > > (std::string_view)
template MYGUI_EXPORT types::TRect< int > parseValue< types::TRect< int > > (std::string_view)
template MYGUI_EXPORT types::TCoord< int > parseValue< types::TCoord< int > > (std::string_view)
template MYGUI_EXPORT types::TCoord< float > parseValue< types::TCoord< float > > (std::string_view)
void trim (std::string &_str, bool _left, bool _right)
const std::string & toString (const std::string &_value)
int parseInt (std::string_view _value)
unsigned int parseUInt (std::string_view _value)
size_t parseSizeT (std::string_view _value)
float parseFloat (std::string_view _value)
double parseDouble (std::string_view _value)
bool parseBool (std::string_view _value)
std::vector< std::string > split (std::string_view _source, std::string_view _delims)
bool startWith (std::string_view _source, std::string_view _value)
bool endWith (std::string_view _source, std::string_view _value)

Function Documentation

◆ endWith()

bool MyGUI::utility::endWith ( std::string_view _source,
std::string_view _value )

Definition at line 126 of file MyGUI_StringUtility.cpp.

◆ parseBool()

bool MyGUI::utility::parseBool ( std::string_view _value)

Definition at line 67 of file MyGUI_StringUtility.cpp.

◆ parseComplex()

template<typename... Args>
__attribute__((visibility("default"))) int parseInt(std __attribute__((visibility("default"))) unsigned int parseUInt(std __attribute__((visibility("default"))) size_t parseSizeT(std __attribute__((visibility("default"))) float parseFloat(std __attribute__((visibility("default"))) double parseDouble(std __attribute__((visibility("default"))) bool parseBool(std __attribute__((visibility("default"))) std bool MyGUI::utility::parseComplex ( std::string_view _value,
Args &... args )
inline

Definition at line 129 of file MyGUI_StringUtility.h.

◆ parseComplex< bool >()

template<>
bool MyGUI::utility::parseComplex< bool > ( std::string_view _value,
bool & arg )
inline

Definition at line 151 of file MyGUI_StringUtility.h.

◆ parseDouble()

double MyGUI::utility::parseDouble ( std::string_view _value)

Definition at line 62 of file MyGUI_StringUtility.cpp.

◆ parseFloat()

float MyGUI::utility::parseFloat ( std::string_view _value)

Definition at line 57 of file MyGUI_StringUtility.cpp.

◆ parseInt()

int MyGUI::utility::parseInt ( std::string_view _value)

Definition at line 42 of file MyGUI_StringUtility.cpp.

◆ parseSizeT()

size_t MyGUI::utility::parseSizeT ( std::string_view _value)

Definition at line 52 of file MyGUI_StringUtility.cpp.

◆ parseUInt()

unsigned int MyGUI::utility::parseUInt ( std::string_view _value)

Definition at line 47 of file MyGUI_StringUtility.cpp.

◆ parseValue() [1/4]

template<>
unsigned char MyGUI::utility::parseValue ( std::string_view _value)
inline

Definition at line 113 of file MyGUI_StringUtility.h.

◆ parseValue() [2/4]

template<>
char MyGUI::utility::parseValue ( std::string_view _value)
inline

Definition at line 106 of file MyGUI_StringUtility.h.

◆ parseValue() [3/4]

template<>
template __attribute__((visibility("default"))) int parseValue< int >(std template __attribute__((visibility("default"))) size_t parseValue< size_t >(std template __attribute__((visibility("default"))) float parseValue< float >(std template __attribute__((visibility("default"))) types template __attribute__((visibility("default"))) types template __attribute__((visibility("default"))) types template __attribute__((visibility("default"))) types template __attribute__((visibility("default"))) types template __attribute__((visibility("default"))) types template __attribute__((visibility("default"))) types bool MyGUI::utility::parseValue ( std::string_view _value)
externinline

Definition at line 99 of file MyGUI_StringUtility.h.

◆ parseValue() [4/4]

template<typename T>
T MyGUI::utility::parseValue ( std::string_view value)

Definition at line 70 of file MyGUI_StringUtility.h.

◆ parseValue< float >()

template MYGUI_EXPORT float MyGUI::utility::parseValue< float > ( std::string_view )

◆ parseValue< int >()

template MYGUI_EXPORT int MyGUI::utility::parseValue< int > ( std::string_view )

◆ parseValue< size_t >()

template MYGUI_EXPORT size_t MyGUI::utility::parseValue< size_t > ( std::string_view )

◆ parseValue< types::TCoord< float > >()

template MYGUI_EXPORT types::TCoord< float > MyGUI::utility::parseValue< types::TCoord< float > > ( std::string_view )

◆ parseValue< types::TCoord< int > >()

template MYGUI_EXPORT types::TCoord< int > MyGUI::utility::parseValue< types::TCoord< int > > ( std::string_view )

◆ parseValue< types::TPoint< float > >()

template MYGUI_EXPORT types::TPoint< float > MyGUI::utility::parseValue< types::TPoint< float > > ( std::string_view )

◆ parseValue< types::TPoint< int > >()

template MYGUI_EXPORT types::TPoint< int > MyGUI::utility::parseValue< types::TPoint< int > > ( std::string_view )

◆ parseValue< types::TRect< int > >()

template MYGUI_EXPORT types::TRect< int > MyGUI::utility::parseValue< types::TRect< int > > ( std::string_view )

◆ parseValue< types::TSize< float > >()

template MYGUI_EXPORT types::TSize< float > MyGUI::utility::parseValue< types::TSize< float > > ( std::string_view )

◆ parseValue< types::TSize< int > >()

template MYGUI_EXPORT types::TSize< int > MyGUI::utility::parseValue< types::TSize< int > > ( std::string_view )

◆ split()

std::vector< std::string > MyGUI::utility::split ( std::string_view _source,
std::string_view _delims )

Definition at line 104 of file MyGUI_StringUtility.cpp.

◆ startWith()

bool MyGUI::utility::startWith ( std::string_view _source,
std::string_view _value )

Definition at line 109 of file MyGUI_StringUtility.cpp.

◆ toPath() [1/4]

std::filesystem::path MyGUI::utility::toPath ( const char * text)
inline

Convert null-terminated UTF-8 bytes to a native filesystem path.

Definition at line 28 of file MyGUI_FileSystemUtility.h.

◆ toPath() [2/4]

std::filesystem::path MyGUI::utility::toPath ( const std::string & text)
inline

Convert UTF-8 bytes to a native filesystem path.

Definition at line 34 of file MyGUI_FileSystemUtility.h.

◆ toPath() [3/4]

std::filesystem::path MyGUI::utility::toPath ( const UString & text)
inline

Convert Unicode text to a native filesystem path.

Definition at line 40 of file MyGUI_FileSystemUtility.h.

◆ toPath() [4/4]

std::filesystem::path MyGUI::utility::toPath ( std::string_view text)
inline

Convert UTF-8 bytes to a native filesystem path.

Definition at line 19 of file MyGUI_FileSystemUtility.h.

◆ toString() [1/4]

template<typename... Args>
std::string MyGUI::utility::toString ( Args &&... args)
inline

Definition at line 55 of file MyGUI_StringUtility.h.

◆ toString() [2/4]

const std::string & MyGUI::utility::toString ( const std::string & _value)

Definition at line 37 of file MyGUI_StringUtility.cpp.

◆ toString() [3/4]

template<>
template __attribute__((visibility("default"))) std template __attribute__((visibility("default"))) std template __attribute__((visibility("default"))) std __attribute__((visibility("default"))) const std std::string MyGUI::utility::toString ( std::string_view _value)
externinline

Definition at line 49 of file MyGUI_StringUtility.h.

◆ toString() [4/4]

template<typename T>
__attribute__((visibility("default"))) void trim(std std::string MyGUI::utility::toString ( T _value)
inline

Definition at line 34 of file MyGUI_StringUtility.h.

◆ toString< bool >()

template<>
std::string MyGUI::utility::toString< bool > ( bool _value)
inline

Definition at line 63 of file MyGUI_StringUtility.h.

◆ toString< float >()

template MYGUI_EXPORT std::string MyGUI::utility::toString< float > ( float )

◆ toString< int >()

template MYGUI_EXPORT std::string MyGUI::utility::toString< int > ( int )

◆ toString< size_t >()

template MYGUI_EXPORT std::string MyGUI::utility::toString< size_t > ( size_t )

◆ toUtf8()

std::string MyGUI::utility::toUtf8 ( const std::filesystem::path & path)
inline

Convert a filesystem path to UTF-8 bytes.

Definition at line 46 of file MyGUI_FileSystemUtility.h.

◆ trim()

void MyGUI::utility::trim ( std::string & _str,
bool _left,
bool _right )

Definition at line 29 of file MyGUI_StringUtility.cpp.