blob: 34449ab3330b5aa314bac2d19b207d178515b613 [file] [log] [blame]
Howard Hinnantc51e1022010-05-11 19:42:16 +00001// -*- C++ -*-
2//===--------------------------- cstring ----------------------------------===//
3//
Chandler Carruth7642bb12019-01-19 08:50:56 +00004// 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 Hinnantc51e1022010-05-11 19:42:16 +00007//
8//===----------------------------------------------------------------------===//
9
10#ifndef _LIBCPP_CSTRING
11#define _LIBCPP_CSTRING
12
13/*
14 cstring synopsis
15
16Macros:
17
18 NULL
Howard Hinnant3b6579a2010-08-22 00:02:43 +000019
Howard Hinnantc51e1022010-05-11 19:42:16 +000020namespace 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 Hinnantaaaa52b2011-10-17 20:05:10 +000062#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
Howard Hinnantc51e1022010-05-11 19:42:16 +000063#pragma GCC system_header
Howard Hinnantaaaa52b2011-10-17 20:05:10 +000064#endif
Howard Hinnantc51e1022010-05-11 19:42:16 +000065
66_LIBCPP_BEGIN_NAMESPACE_STD
67
Louis Dionne9c660c62021-06-02 10:41:37 -040068using ::size_t _LIBCPP_USING_IF_EXISTS;
69using ::memcpy _LIBCPP_USING_IF_EXISTS;
70using ::memmove _LIBCPP_USING_IF_EXISTS;
71using ::strcpy _LIBCPP_USING_IF_EXISTS;
72using ::strncpy _LIBCPP_USING_IF_EXISTS;
73using ::strcat _LIBCPP_USING_IF_EXISTS;
74using ::strncat _LIBCPP_USING_IF_EXISTS;
75using ::memcmp _LIBCPP_USING_IF_EXISTS;
76using ::strcmp _LIBCPP_USING_IF_EXISTS;
77using ::strncmp _LIBCPP_USING_IF_EXISTS;
78using ::strcoll _LIBCPP_USING_IF_EXISTS;
79using ::strxfrm _LIBCPP_USING_IF_EXISTS;
80using ::memchr _LIBCPP_USING_IF_EXISTS;
81using ::strchr _LIBCPP_USING_IF_EXISTS;
82using ::strcspn _LIBCPP_USING_IF_EXISTS;
83using ::strpbrk _LIBCPP_USING_IF_EXISTS;
84using ::strrchr _LIBCPP_USING_IF_EXISTS;
85using ::strspn _LIBCPP_USING_IF_EXISTS;
86using ::strstr _LIBCPP_USING_IF_EXISTS;
Ed Schouten137c8632015-06-24 08:44:38 +000087#ifndef _LIBCPP_HAS_NO_THREAD_UNSAFE_C_FUNCTIONS
Louis Dionne9c660c62021-06-02 10:41:37 -040088using ::strtok _LIBCPP_USING_IF_EXISTS;
Ed Schouten137c8632015-06-24 08:44:38 +000089#endif
Louis Dionne9c660c62021-06-02 10:41:37 -040090using ::memset _LIBCPP_USING_IF_EXISTS;
91using ::strerror _LIBCPP_USING_IF_EXISTS;
92using ::strlen _LIBCPP_USING_IF_EXISTS;
Howard Hinnantc51e1022010-05-11 19:42:16 +000093
Howard Hinnantc51e1022010-05-11 19:42:16 +000094_LIBCPP_END_NAMESPACE_STD
95
Louis Dionne2b1ceaa2021-04-20 12:03:32 -040096#endif // _LIBCPP_CSTRING