blob: d550695caa42f28e1376fc210cafd39ddf7e78de [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
Howard Hinnant08e17472011-10-17 20:05:10 +000063#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
Howard Hinnantbc8d3f92010-05-11 19:42:16 +000064#pragma GCC system_header
Howard Hinnant08e17472011-10-17 20:05:10 +000065#endif
Howard Hinnantbc8d3f92010-05-11 19:42:16 +000066
67_LIBCPP_BEGIN_NAMESPACE_STD
68
69using ::size_t;
Marshall Clowb957bac2015-06-02 22:26:29 +000070using ::memcpy;
71using ::memmove;
Howard Hinnantbc8d3f92010-05-11 19:42:16 +000072using ::strcpy;
73using ::strncpy;
74using ::strcat;
75using ::strncat;
Marshall Clowb957bac2015-06-02 22:26:29 +000076using ::memcmp;
Howard Hinnantbc8d3f92010-05-11 19:42:16 +000077using ::strcmp;
Marshall Clowb957bac2015-06-02 22:26:29 +000078using ::strncmp;
Howard Hinnantbc8d3f92010-05-11 19:42:16 +000079using ::strcoll;
80using ::strxfrm;
Richard Smith9d6ca492015-10-29 23:32:29 +000081using ::memchr;
Richard Smith9d6ca492015-10-29 23:32:29 +000082using ::strchr;
Howard Hinnantbc8d3f92010-05-11 19:42:16 +000083using ::strcspn;
Richard Smith9d6ca492015-10-29 23:32:29 +000084using ::strpbrk;
Richard Smith9d6ca492015-10-29 23:32:29 +000085using ::strrchr;
Howard Hinnantbc8d3f92010-05-11 19:42:16 +000086using ::strspn;
Richard Smith9d6ca492015-10-29 23:32:29 +000087using ::strstr;
Ed Schouten323ade32015-06-24 08:44:38 +000088#ifndef _LIBCPP_HAS_NO_THREAD_UNSAFE_C_FUNCTIONS
Howard Hinnantbc8d3f92010-05-11 19:42:16 +000089using ::strtok;
Ed Schouten323ade32015-06-24 08:44:38 +000090#endif
Howard Hinnantbc8d3f92010-05-11 19:42:16 +000091using ::memset;
92using ::strerror;
93using ::strlen;
94
Howard Hinnantbc8d3f92010-05-11 19:42:16 +000095_LIBCPP_END_NAMESPACE_STD
96
97#endif // _LIBCPP_CSTRING