27 #ifndef ICB_PX_STRING_H 28 #define ICB_PX_STRING_H 30 #include "engines/icb/common/px_rcutypes.h" 44 operator const char *()
const {
47 const char *operator=(
const char *);
49 const char *operator+=(
const char *);
50 char &operator[](uint32 n) {
53 char &operator[](int32 n) {
57 return ((
bool)(s == NULL));
60 uint32 GetLen()
const;
64 const char *c_str() {
return s; }
65 const pxString &Format(
const char *, ...);
67 const pxString operator+(
const char *)
const;
69 inline pxString Substr(uint32 nStart, uint32 nLen)
const;
70 void Substr(
pxString &rsStr, uint32 nStart, uint32 nLen)
const;
72 void SetString(
const char *data, uint32 len);
74 uint32 StrChr(
char cToFind, uint32 nStartPos = 0)
const;
77 bool operator==(
const char *
string)
const;
78 bool operator!=(
const char *
string)
const;
81 inline pxString::pxString(
const pxString &str) {
84 uint32 len = strlen((
char *)str.s) + 1;
86 memcpy((
unsigned char *)s, (
unsigned char *)str.s, len);
92 inline pxString::~pxString() {
98 const char *pxVString(MSVC_PRINTF
const char *format, ...)
GCC_PRINTF(1, 2);
109 char &operator[](uint32);
110 void CheckSize(uint32);
124 void StrCpy(uint32 offset,
const char *text);
125 void StrnCpy(uint32 offset,
const char *text, uint32 len);
140 operator void *() {
return (m_data); }
141 operator char *() {
return (m_data); }
149 inline pxString::pxString() {
154 inline pxString::pxString(
const char *str) {
157 uint32 len = strlen(str) + 1;
164 inline bool pxString::IsEmpty()
const {
166 if ((s == NULL) || (*s == 0))
172 inline uint32 pxString::GetLen()
const {
179 inline pxString pxString::Substr(uint32 nStart, uint32 nNum)
const {
182 Substr(rsRetVal, nStart, nNum);
187 inline bool pxString::operator!=(
const char *
string)
const {
190 return ((
bool)!((*
this) ==
string));
195 #endif // #ifndef _PX_pxString_H Definition: px_string.h:34
Definition: px_string.h:100
int FORCEINLINE GCC_PRINTF(2, 0) int vsprintf_s(T(&dst)[N]
Definition: px_string.h:133