xref: /freebsd/contrib/llvm-project/libcxx/include/cstring (revision f078c492a9b57877c723586db26d789cda1b98ea)
1// -*- C++ -*-
2//===--------------------------- cstring ----------------------------------===//
3//
4// 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
7//
8//===----------------------------------------------------------------------===//
9
10#ifndef _LIBCPP_CSTRING
11#define _LIBCPP_CSTRING
12
13/*
14    cstring synopsis
15
16Macros:
17
18    NULL
19
20namespace 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
62#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
63#pragma GCC system_header
64#endif
65
66_LIBCPP_BEGIN_NAMESPACE_STD
67
68using ::size_t;
69using ::memcpy;
70using ::memmove;
71using ::strcpy;
72using ::strncpy;
73using ::strcat;
74using ::strncat;
75using ::memcmp;
76using ::strcmp;
77using ::strncmp;
78using ::strcoll;
79using ::strxfrm;
80using ::memchr;
81using ::strchr;
82using ::strcspn;
83using ::strpbrk;
84using ::strrchr;
85using ::strspn;
86using ::strstr;
87#ifndef _LIBCPP_HAS_NO_THREAD_UNSAFE_C_FUNCTIONS
88using ::strtok;
89#endif
90using ::memset;
91using ::strerror;
92using ::strlen;
93
94_LIBCPP_END_NAMESPACE_STD
95
96#endif  // _LIBCPP_CSTRING
97