ReactOS 0.4.15-dev-7918-g2a2556c
safestr.h File Reference
#include <tchar.h>
#include <string.h>
#include "assert.h"
Include dependency graph for safestr.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Macros

#define tchar   TCHAR
 

Functions

size_t safestrlen (const tchar *string)
 
tcharsafestrcpy (tchar *strDest, const tchar *strSource)
 
tcharsafestrncpy (tchar *strDest, const tchar *strSource, size_t count)
 
tcharsafestrlwr (tchar *str)
 
tcharsafestrupr (tchar *str)
 

Macro Definition Documentation

◆ tchar

#define tchar   TCHAR

Definition at line 13 of file safestr.h.

Function Documentation

◆ safestrcpy()

tchar * safestrcpy ( tchar strDest,
const tchar strSource 
)
inline

Definition at line 26 of file safestr.h.

27{
28 ASSERT(strDest);
29 if ( !strSource )
30 *strDest = 0;
31 else
32 _tcscpy ( strDest, strSource );
33 return strDest;
34}
#define _tcscpy
Definition: tchar.h:623
#define ASSERT(a)
Definition: mode.c:44

◆ safestrlen()

size_t safestrlen ( const tchar string)
inline

Definition at line 19 of file safestr.h.

20{
21 if ( !string )
22 return 0;
23 return _tcslen(string);
24}
#define _tcslen
Definition: xmlstorage.h:198

Referenced by EnumFilesInDirectory().

◆ safestrlwr()

tchar * safestrlwr ( tchar str)
inline

Definition at line 47 of file safestr.h.

48{
49 if ( !str )
50 return 0;
51 return _tcslwr(str);
52}
#define _tcslwr
Definition: tchar.h:1465
const WCHAR * str

◆ safestrncpy()

tchar * safestrncpy ( tchar strDest,
const tchar strSource,
size_t  count 
)
inline

Definition at line 36 of file safestr.h.

37{
38 ASSERT(strDest);
39 if ( !strSource )
40 count = 0;
41 else
42 _tcsncpy ( strDest, strSource, count );
43 strDest[count] = 0;
44 return strDest;
45}
GLuint GLuint GLsizei count
Definition: gl.h:1545
#define _tcsncpy
Definition: tchar.h:1410

◆ safestrupr()

tchar * safestrupr ( tchar str)
inline

Definition at line 54 of file safestr.h.

55{
56 if ( !str )
57 return 0;
58 return _tcsupr(str);
59}
#define _tcsupr
Definition: tchar.h:1467