Adding Crunch at r319.
This commit is contained in:
35
third_party/crunch/crnlib/crn_strutils.h
vendored
Normal file
35
third_party/crunch/crnlib/crn_strutils.h
vendored
Normal file
@@ -0,0 +1,35 @@
|
||||
// File: crn_strutils.h
|
||||
// See Copyright Notice and license at the end of inc/crnlib.h
|
||||
#pragma once
|
||||
|
||||
#ifdef WIN32
|
||||
#define CRNLIB_PATH_SEPERATOR_CHAR '\\'
|
||||
#else
|
||||
#define CRNLIB_PATH_SEPERATOR_CHAR '/'
|
||||
#endif
|
||||
|
||||
namespace crnlib
|
||||
{
|
||||
char* crn_strdup(const char* pStr);
|
||||
int crn_stricmp(const char *p, const char *q);
|
||||
|
||||
char* strcpy_safe(char* pDst, uint dst_len, const char* pSrc);
|
||||
|
||||
bool int_to_string(int value, char* pDst, uint len);
|
||||
bool uint_to_string(uint value, char* pDst, uint len);
|
||||
|
||||
bool string_to_int(const char*& pBuf, int& value);
|
||||
|
||||
bool string_to_uint(const char*& pBuf, uint& value);
|
||||
|
||||
bool string_to_int64(const char*& pBuf, int64& value);
|
||||
bool string_to_uint64(const char*& pBuf, uint64& value);
|
||||
|
||||
bool string_to_bool(const char* p, bool& value);
|
||||
|
||||
bool string_to_float(const char*& p, float& value, uint round_digit = 512U);
|
||||
|
||||
bool string_to_double(const char*& p, double& value, uint round_digit = 512U);
|
||||
bool string_to_double(const char*& p, const char *pEnd, double& value, uint round_digit = 512U);
|
||||
|
||||
} // namespace crnlib
|
||||
Reference in New Issue
Block a user