HDK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
UT_StringUtils.h File Reference
#include "UT_API.h"
#include "UT_Array.h"
#include "UT_StringView.h"
#include <SYS/SYS_Compiler.h>
#include <SYS/SYS_String.h>
#include <SYS/SYS_Inline.h>
#include <type_traits>
+ Include dependency graph for UT_StringUtils.h:
+ This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Functions

SYS_FORCE_INLINE bool UTisstring (const char *s)
 
template<typename T >
SYS_NO_DISCARD_RESULT bool UTstringStartsWith (const T &str, const char *prefix, bool case_sensitive=true, exint len=-1)
 
template<typename T >
SYS_NO_DISCARD_RESULT bool UTstringEndsWith (const T &str, const char *suffix, bool case_sensitive=true, exint len=-1)
 
template<typename T >
SYS_NO_DISCARD_RESULT const char * UTstringNumericSuffix (const T &str)
 
template<typename StringT >
SYS_NO_DISCARD_RESULT UT_StringView UTstringFileName (const StringT &str)
 
template<>
SYS_NO_DISCARD_RESULT UT_StringView UTstringFileName (const UT_StringView &str)
 
template<typename StringT >
SYS_NO_DISCARD_RESULT UT_StringView UTstringFileExtension (const StringT &str)
 
template<>
SYS_NO_DISCARD_RESULT UT_StringView UTstringFileExtension< UT_StringView > (const UT_StringView &str)
 
template<typename StringT >
SYS_NO_DISCARD_RESULT bool UTstringMatchFileExtension (const StringT &str, const char *extension)
 
template<typename StringT >
SYS_NO_DISCARD_RESULT int UTstringCountChar (const StringT &str, int c)
 
template<>
SYS_NO_DISCARD_RESULT int UTstringCountChar< UT_StringView > (const UT_StringView &str, int c)
 
template<typename StringT >
SYS_NO_DISCARD_RESULT bool UTstringIsFloat (const StringT &str, bool skip_spaces=false, bool loose=false, bool allow_underscore=false)
 
template<>
SYS_NO_DISCARD_RESULT bool UTstringIsFloat< UT_StringView > (const UT_StringView &str, bool skip_spaces, bool loose, bool allow_underscore)
 
template<typename StringT >
SYS_NO_DISCARD_RESULT bool UTstringIsInteger (const StringT &str, bool skip_spaces=false)
 
template<>
SYS_NO_DISCARD_RESULT bool UTstringIsInteger< UT_StringView > (const UT_StringView &str, bool skip_spaces)
 

Function Documentation

SYS_FORCE_INLINE bool UTisstring ( const char *  s)
Examples:
FS/FS_HomeHelper.C, and SIM/GAS_NetVDBSliceExchange.C.

Definition at line 26 of file UT_StringUtils.h.

template<typename StringT >
SYS_NO_DISCARD_RESULT int UTstringCountChar ( const StringT &  str,
int  c 
)

Definition at line 158 of file UT_StringUtils.h.

Definition at line 166 of file UT_StringUtils.h.

template<typename T >
SYS_NO_DISCARD_RESULT bool UTstringEndsWith ( const T &  str,
const char *  suffix,
bool  case_sensitive = true,
exint  len = -1 
)

Definition at line 53 of file UT_StringUtils.h.

template<typename StringT >
SYS_NO_DISCARD_RESULT UT_StringView UTstringFileExtension ( const StringT &  str)

Definition at line 120 of file UT_StringUtils.h.

template<typename StringT >
SYS_NO_DISCARD_RESULT UT_StringView UTstringFileName ( const StringT &  str)

Definition at line 94 of file UT_StringUtils.h.

template<>
SYS_NO_DISCARD_RESULT UT_StringView UTstringFileName ( const UT_StringView str)
inline

Definition at line 103 of file UT_StringUtils.h.

template<typename StringT >
SYS_NO_DISCARD_RESULT bool UTstringIsFloat ( const StringT &  str,
bool  skip_spaces = false,
bool  loose = false,
bool  allow_underscore = false 
)

Definition at line 189 of file UT_StringUtils.h.

template<>
SYS_NO_DISCARD_RESULT bool UTstringIsFloat< UT_StringView > ( const UT_StringView str,
bool  skip_spaces,
bool  loose,
bool  allow_underscore 
)
inline

Definition at line 287 of file UT_StringUtils.h.

template<typename StringT >
SYS_NO_DISCARD_RESULT bool UTstringIsInteger ( const StringT &  str,
bool  skip_spaces = false 
)

Definition at line 300 of file UT_StringUtils.h.

template<>
SYS_NO_DISCARD_RESULT bool UTstringIsInteger< UT_StringView > ( const UT_StringView str,
bool  skip_spaces 
)
inline

Definition at line 337 of file UT_StringUtils.h.

template<typename StringT >
SYS_NO_DISCARD_RESULT bool UTstringMatchFileExtension ( const StringT &  str,
const char *  extension 
)

Definition at line 150 of file UT_StringUtils.h.

template<typename T >
SYS_NO_DISCARD_RESULT const char* UTstringNumericSuffix ( const T &  str)

Definition at line 76 of file UT_StringUtils.h.

template<typename T >
SYS_NO_DISCARD_RESULT bool UTstringStartsWith ( const T &  str,
const char *  prefix,
bool  case_sensitive = true,
exint  len = -1 
)

Definition at line 30 of file UT_StringUtils.h.