12 #ifndef __SYS_ParseNumber__
13 #define __SYS_ParseNumber__
40 {
return (
int(a) &
int(b)) ==
int(b); }
113 SYSatoi32(
const char *
buf,
int base=10)
116 const char *
end =
nullptr;
122 SYSatou32(
const char *
buf,
int base=10)
125 const char *
end =
nullptr;
131 SYSatoi64(
const char *
buf,
int base=10)
134 const char *
end =
nullptr;
140 SYSatou64(
const char *
buf,
int base=10)
143 const char *
end =
nullptr;
149 SYSstrtoi32(
const char *
buf,
char **endptr=
nullptr,
int base=0)
152 const char *
end =
nullptr;
155 *endptr =
const_cast<char *
>(
end);
159 SYSstrtou32(
const char *buf,
char **endptr=
nullptr,
int base=0)
162 const char *end =
nullptr;
165 *endptr =
const_cast<char *
>(
end);
169 SYSstrtoi64(
const char *buf,
char **endptr=
nullptr,
int base=0)
172 const char *end =
nullptr;
175 *endptr =
const_cast<char *
>(
end);
179 SYSstrtou64(
const char *buf,
char **endptr=
nullptr,
int base=0)
182 const char *end =
nullptr;
185 *endptr =
const_cast<char *
>(
end);
190 SYSstrtod(
const char *buf,
char **endptr=
nullptr)
193 const char *end =
nullptr;
196 *endptr =
const_cast<char *
>(
end);
201 SYSstrtof32(
const char *buf,
char **endptr=
nullptr)
204 const char *end =
nullptr;
207 *endptr =
const_cast<char *
>(
end);
212 SYSstrtof64(
const char *buf,
char **endptr=
nullptr)
215 const char *end =
nullptr;
218 *endptr =
const_cast<char *
>(
end);
223 SYSatof32(
const char *buf)
226 const char *end =
nullptr;
232 SYSatof64(
const char *buf)
235 const char *end =
nullptr;
240 static inline int SYSstrtoi(
const char *buf) {
return SYSstrtoi32(buf); }
241 static inline uint SYSstrtou(
const char *buf) {
return SYSstrtou32(buf); }
243 static inline int SYSatoi(
const char *buf,
int base=10)
244 {
return SYSatoi32(buf, base); }
245 static inline uint SYSatou(
const char *buf,
int base=10)
246 {
return SYSatou32(buf, base); }
249 SYSatof(
const char *buf)
252 const char *end =
nullptr;
260 SYSstrtoi_underscore(
const char *buf,
int base=10)
263 const char *end =
nullptr;
271 SYSstrtod_underscore(
const char *buf)
274 const char *end =
nullptr;
279 #endif // __SYS_ParseNumber__
typedef int(APIENTRYP RE_PFNGLXSWAPINTERVALSGIPROC)(int)
GLenum GLuint GLenum GLsizei const GLchar * buf
GLboolean GLboolean GLboolean GLboolean a
Invalid arguments were passed in (e.g. bad number base, invalid range).
**But if you need a result
unsigned long long uint64
SYS_API SYS_ParseStatus SYSparseInteger(const char *begin, const char *&end, int8 &number, int base=0, SYS_ParseFlags flags=SYS_ParseFlags::None)
Allow underscore ('_') to be used as a digit separator.
const TypeMask operator|(const TypeMask &m1, const TypeMask &m2)
GLboolean GLboolean GLboolean b
SYS_API SYS_ParseStatus SYSparseFloat(const char *begin, const char *&end, fpreal16 &number, SYS_ParseFlags flags=SYS_ParseFlags::None)
const TypeMask operator&(const TypeMask &m1, const TypeMask &m2)
SYS_ParseStatus
List of possible states the parsing ended in.
A number was successfully parsed.
PcpNodeRef_ChildrenIterator begin(const PcpNodeRef::child_const_range &r)
Support for range-based for loops for PcpNodeRef children ranges.