(my)TinyLibC 0.0.1
little tiny pretty lib c
Loading...
Searching...
No Matches
tlcstrings.h
Go to the documentation of this file.
1/*
2** EPITECH PROJECT, 2022
3** (my) Tiny Lib C
4** File description:
5** prototypes of strings part
6*/
7
8#ifndef TLS_STRINGS_H_
9 #define TLS_STRINGS_H_
10
11 #include <stddef.h>
12
22void *x_memcpy(void *dest, const void *src, size_t n);
23
32char *x_strchr(const char *s, int c);
33
42int x_strcmp(const char *s1, const char *s2);
43
52char *x_strcpy(char *dest, const char *src);
53
61char *x_strdup(const char *s);
62
70size_t x_strlen(const char *s);
71
81char *x_strncpy(char *dest, const char *src, size_t n);
82
91char *x_strndup(const char *s, int n);
92
100char *x_strrev(char *str);
101
110char **x_strsplit(const char *s, const char *delim);
111
121char *x_strstr(const char *s, const char *substr);
122
131char *x_strstrip(const char *s, const char *chars);
132
141int x_strcontainc(char const *str, char const c);
142
151int x_strendswith(const char *str, const char *needle);
152
153#endif
char * x_strchr(const char *s, int c)
search c in s
char * x_strndup(const char *s, int n)
duplicate n char of a string
char ** x_strsplit(const char *s, const char *delim)
split a string with delimiter
char * x_strstr(const char *s, const char *substr)
search a string in another string
size_t x_strlen(const char *s)
get length of a string
char * x_strrev(char *str)
reverse a string
char * x_strdup(const char *s)
duplicate a string
char * x_strncpy(char *dest, const char *src, size_t n)
copy n char of src in dest
char * x_strcpy(char *dest, const char *src)
copy src in dest (dest must be able to store src)
int x_strcmp(const char *s1, const char *s2)
compare two strings
int x_strendswith(const char *str, const char *needle)
check if str ends with needle
char * x_strstrip(const char *s, const char *chars)
remove character at start and end
void * x_memcpy(void *dest, const void *src, size_t n)
copy bytes of src to dest
int x_strcontainc(char const *str, char const c)
check if str contain c