-
Notifications
You must be signed in to change notification settings - Fork 1
/
string.h
61 lines (51 loc) · 1.71 KB
/
string.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
/*
* NCSOCK & NESCA4
* Сделано от души 2023.
* Copyright (c) [2023] [lomaster]
* SPDX-License-Identifier: BSD-3-Clause
*
* string.h - contains functions for working
* with strings.
*/
#ifndef NOTGNU_STRING_H
#define NOTGNU_STRING_H
#include "ngubits/types.h"
#include "ngusyst/cdefs.h"
#include "ctype.h"
#include "limits.h"
#ifndef NULL /* NULL casual macros */
#define NULL ((void *) 0)
#endif
__BEGIN_DECLS
/*TODO fucking locale*/
int strcoll(const char *s1, const char *s2);
char* strrchr(const char *s, int c);
u64 strxfrm(char* s1, const char* s2, u64 n);
/* NO ANSI */
void* memset_fast(void* b, int c, u64 len); /* for big datablocks */
void* memccpy(void* t, const void* f, int c, u64 n);
u64 strlcpy(char* dst, const char* src, u64 dlen);
char* strtok_r(char* str, const char* delim, char** sptr);
/* ANSI C */
void* memset(void* s, int c, u64 n);
void* memchr(const void* s, int c, u64 n);
int memcmp(const void *s1, const void *s2, u64 n);
void* memcpy(void* s1, const void* s2, u64 n);
u64 strlen(const char* s);
char* strchr(const char* s, int c);
char* strcpy(char* s1, const char* s2);
int strcmp(const char* s1, const char* s2);
int strncmp(const char* s1, const char* s2, u64 n);
char* strncpy(char* s1, const char* s2, u64 n);
char* strstr(const char* s1, const char* s2);
char* strtok(char* s1, const char* s2);
char* strncat(char* s1, const char* s2, u64 n);
char* strpbrk(const char* s1, const char* s2);
u64 strspn(const char* s1, const char* s2);
u64 strcspn(const char* s1, const char* s2);
char* strerror(int errnum);
char* strcat(char* s1, const char* s2);
#define memmove(s1, s2, n) memcpy(s1, s2, n)
#define bcopy(s1, s2, n) memcpy(s1, s2, n)
__END_DECLS
#endif