1/*
2 * Copyright (c) 2008-2015, NVIDIA CORPORATION. All rights reserved.
3 *
4 * NVIDIA CORPORATION and its licensors retain all intellectual property
5 * and proprietary rights in and to this software, related documentation
6 * and any modifications thereto. Any use, reproduction, disclosure or
7 * distribution of this software and related documentation without an express
8 * license agreement from NVIDIA CORPORATION is strictly prohibited.
9 */
10// Copyright (c) 2004-2008 AGEIA Technologies, Inc. All rights reserved.
11// Copyright (c) 2001-2004 NovodeX AG. All rights reserved.
12
13
14#ifndef PX_FOUNDATION_PX_UNIX_STRING_H
15#define PX_FOUNDATION_PX_UNIX_STRING_H
16
17#include "foundation/Px.h"
18
19#include <stdio.h>
20#include <string.h>
21#include <stdarg.h>
22
23#ifndef PX_DOXYGEN
24namespace physx
25{
26#endif
27
28 PX_INLINE void PxStrcpy(char* dest, size_t size, const char* src)
29 {
30 ::strncpy(dest, src, size);
31 }
32
33 PX_INLINE int PxStrcat(char* dest, size_t size, const char* src)
34 {
35 PX_UNUSED(size);
36 ::strcat(dest, src);
37 return 0;
38 }
39 PX_INLINE int PxVsprintf(char* dest, size_t size, const char* src, va_list arg)
40 {
41 PX_UNUSED(size);
42 int r = ::vsprintf( dest, src, arg );
43 return r;
44 }
45 PX_INLINE int PxStricmp(const char *str, const char *str1) {return(::strcasecmp(str, str1));}
46
47#ifndef PX_DOXYGEN
48} // namespace physx
49#endif
50
51#endif
52