blob: 06521d1e6b2c7c364c6bb04d1b6f017cbfb3c6b6 [file] [log] [blame]
Howard Hinnantbc8d3f92010-05-11 19:42:16 +00001// -*- C++ -*-
2//===--------------------------- cstring ----------------------------------===//
3//
Howard Hinnantf5256e12010-05-11 21:36:01 +00004// The LLVM Compiler Infrastructure
Howard Hinnantbc8d3f92010-05-11 19:42:16 +00005//
6// This file is distributed under the University of Illinois Open Source
7// License. See LICENSE.TXT for details.
8//
9//===----------------------------------------------------------------------===//
10
11#ifndef _LIBCPP_CSTRING
12#define _LIBCPP_CSTRING
13
14/*
15 cstring synopsis
16
17Macros:
18
19 NULL
Howard Hinnant324bb032010-08-22 00:02:43 +000020
Howard Hinnantbc8d3f92010-05-11 19:42:16 +000021namespace std
22{
23
24Types:
25
26 size_t
27
28void* memcpy(void* restrict s1, const void* restrict s2, size_t n);
29void* memmove(void* s1, const void* s2, size_t n);
30char* strcpy (char* restrict s1, const char* restrict s2);
31char* strncpy(char* restrict s1, const char* restrict s2, size_t n);
32char* strcat (char* restrict s1, const char* restrict s2);
33char* strncat(char* restrict s1, const char* restrict s2, size_t n);
34int memcmp(const void* s1, const void* s2, size_t n);
35int strcmp (const char* s1, const char* s2);
36int strncmp(const char* s1, const char* s2, size_t n);
37int strcoll(const char* s1, const char* s2);
38size_t strxfrm(char* restrict s1, const char* restrict s2, size_t n);
39const void* memchr(const void* s, int c, size_t n);
40 void* memchr( void* s, int c, size_t n);
41const char* strchr(const char* s, int c);
42 char* strchr( char* s, int c);
43size_t strcspn(const char* s1, const char* s2);
44const char* strpbrk(const char* s1, const char* s2);
45 char* strpbrk( char* s1, const char* s2);
46const char* strrchr(const char* s, int c);
47 char* strrchr( char* s, int c);
48size_t strspn(const char* s1, const char* s2);
49const char* strstr(const char* s1, const char* s2);
50 char* strstr( char* s1, const char* s2);
51char* strtok(char* restrict s1, const char* restrict s2);
52void* memset(void* s, int c, size_t n);
53char* strerror(int errnum);
54size_t strlen(const char* s);
55
56} // std
57
58*/
59
60#include <__config>
61#include <string.h>
62
63#pragma GCC system_header
64
65_LIBCPP_BEGIN_NAMESPACE_STD
66
67using ::size_t;
68using ::memcpy;
69using ::memmove;
70using ::strcpy;
71using ::strncpy;
72using ::strcat;
73using ::strncat;
74using ::memcmp;
75using ::strcmp;
76using ::strncmp;
77using ::strcoll;
78using ::strxfrm;
79
Howard Hinnant0a68a4d2010-08-10 21:57:23 +000080using ::memchr;
Howard Hinnantbc8d3f92010-05-11 19:42:16 +000081inline _LIBCPP_INLINE_VISIBILITY void* memchr( void* __s, int __c, size_t __n) {return ::memchr(__s, __c, __n);}
82
Howard Hinnant0a68a4d2010-08-10 21:57:23 +000083using ::strchr;
Howard Hinnantbc8d3f92010-05-11 19:42:16 +000084inline _LIBCPP_INLINE_VISIBILITY char* strchr( char* __s, int __c) {return ::strchr(__s, __c);}
85
86using ::strcspn;
87
Howard Hinnant0a68a4d2010-08-10 21:57:23 +000088using ::strpbrk;
Howard Hinnantbc8d3f92010-05-11 19:42:16 +000089inline _LIBCPP_INLINE_VISIBILITY char* strpbrk( char* __s1, const char* __s2) {return ::strpbrk(__s1, __s2);}
90
Howard Hinnant0a68a4d2010-08-10 21:57:23 +000091using ::strrchr;
Howard Hinnantbc8d3f92010-05-11 19:42:16 +000092inline _LIBCPP_INLINE_VISIBILITY char* strrchr( char* __s, int __c) {return ::strrchr(__s, __c);}
93
94using ::strspn;
95
Howard Hinnant0a68a4d2010-08-10 21:57:23 +000096using ::strstr;
Howard Hinnantbc8d3f92010-05-11 19:42:16 +000097inline _LIBCPP_INLINE_VISIBILITY char* strstr( char* __s1, const char* __s2) {return ::strstr(__s1, __s2);}
98
99using ::strtok;
100using ::memset;
101using ::strerror;
102using ::strlen;
103
104_LIBCPP_END_NAMESPACE_STD
105
106#endif // _LIBCPP_CSTRING