blob: 8bc96a023302bd62964295233ece2f4e2b327266 [file] [log] [blame]
Howard Hinnant3e519522010-05-11 19:42:161// -*- C++ -*-
2//===--------------------------- cstring ----------------------------------===//
3//
Chandler Carruth2946cd72019-01-19 08:50:564// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
5// See https://llvm.org/LICENSE.txt for license information.
6// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
Howard Hinnant3e519522010-05-11 19:42:167//
8//===----------------------------------------------------------------------===//
9
10#ifndef _LIBCPP_CSTRING
11#define _LIBCPP_CSTRING
12
13/*
14 cstring synopsis
15
16Macros:
17
18 NULL
Howard Hinnantb3371f62010-08-22 00:02:4319
Howard Hinnant3e519522010-05-11 19:42:1620namespace std
21{
22
23Types:
24
25 size_t
26
27void* memcpy(void* restrict s1, const void* restrict s2, size_t n);
28void* memmove(void* s1, const void* s2, size_t n);
29char* strcpy (char* restrict s1, const char* restrict s2);
30char* strncpy(char* restrict s1, const char* restrict s2, size_t n);
31char* strcat (char* restrict s1, const char* restrict s2);
32char* strncat(char* restrict s1, const char* restrict s2, size_t n);
33int memcmp(const void* s1, const void* s2, size_t n);
34int strcmp (const char* s1, const char* s2);
35int strncmp(const char* s1, const char* s2, size_t n);
36int strcoll(const char* s1, const char* s2);
37size_t strxfrm(char* restrict s1, const char* restrict s2, size_t n);
38const void* memchr(const void* s, int c, size_t n);
39 void* memchr( void* s, int c, size_t n);
40const char* strchr(const char* s, int c);
41 char* strchr( char* s, int c);
42size_t strcspn(const char* s1, const char* s2);
43const char* strpbrk(const char* s1, const char* s2);
44 char* strpbrk( char* s1, const char* s2);
45const char* strrchr(const char* s, int c);
46 char* strrchr( char* s, int c);
47size_t strspn(const char* s1, const char* s2);
48const char* strstr(const char* s1, const char* s2);
49 char* strstr( char* s1, const char* s2);
50char* strtok(char* restrict s1, const char* restrict s2);
51void* memset(void* s, int c, size_t n);
52char* strerror(int errnum);
53size_t strlen(const char* s);
54
55} // std
56
57*/
58
59#include <__config>
60#include <string.h>
61
Howard Hinnant073458b2011-10-17 20:05:1062#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
Howard Hinnant3e519522010-05-11 19:42:1663#pragma GCC system_header
Howard Hinnant073458b2011-10-17 20:05:1064#endif
Howard Hinnant3e519522010-05-11 19:42:1665
66_LIBCPP_BEGIN_NAMESPACE_STD
67
68using ::size_t;
Marshall Clow3ca20992015-06-02 22:26:2969using ::memcpy;
70using ::memmove;
Howard Hinnant3e519522010-05-11 19:42:1671using ::strcpy;
72using ::strncpy;
73using ::strcat;
74using ::strncat;
Marshall Clow3ca20992015-06-02 22:26:2975using ::memcmp;
Howard Hinnant3e519522010-05-11 19:42:1676using ::strcmp;
Marshall Clow3ca20992015-06-02 22:26:2977using ::strncmp;
Howard Hinnant3e519522010-05-11 19:42:1678using ::strcoll;
79using ::strxfrm;
Richard Smith25cb3202015-10-29 23:32:2980using ::memchr;
Richard Smith25cb3202015-10-29 23:32:2981using ::strchr;
Howard Hinnant3e519522010-05-11 19:42:1682using ::strcspn;
Richard Smith25cb3202015-10-29 23:32:2983using ::strpbrk;
Richard Smith25cb3202015-10-29 23:32:2984using ::strrchr;
Howard Hinnant3e519522010-05-11 19:42:1685using ::strspn;
Richard Smith25cb3202015-10-29 23:32:2986using ::strstr;
Ed Schoutene0cf3b92015-06-24 08:44:3887#ifndef _LIBCPP_HAS_NO_THREAD_UNSAFE_C_FUNCTIONS
Howard Hinnant3e519522010-05-11 19:42:1688using ::strtok;
Ed Schoutene0cf3b92015-06-24 08:44:3889#endif
Howard Hinnant3e519522010-05-11 19:42:1690using ::memset;
91using ::strerror;
92using ::strlen;
93
Howard Hinnant3e519522010-05-11 19:42:1694_LIBCPP_END_NAMESPACE_STD
95
96#endif // _LIBCPP_CSTRING