LibGame v0.4.0
The LG Game Engine - Copyright (C) 2024-2026 ETMSoftware
Loading...
Searching...
No Matches
str_mem.h
1/*
2 * libetm / str_mem.h - Copyright (C) Emmanuel Thomas-Maurin 2008-2026
4 *
5 * - A few strings and memory management functions -
6 *
7 * This program is free software: you can redistribute it and/or modify
8 * it under the terms of the GNU General Public License as published by
9 * the Free Software Foundation, either version 3 of the License, or
10 * (at your option) any later version.
11 *
12 * This program is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 * GNU General Public License for more details.
16 *
17 * You should have received a copy of the GNU General Public License
18 * along with this program. If not, see <http://www.gnu.org/licenses/>.
19 */
20
21#ifndef INC_LIBETM_STR_MEM_H
22#define INC_LIBETM_STR_MEM_H
23
24char *str_n_cpy(char *, const char *, size_t);
25
26char *str_n_cat(char *, const char *, size_t);
27
28char *l_str_new(const char *str);
29
30char *l_str_cat(char *, const char *);
31
32char *l_str_insert_at_b(char *, const char *);
33
34void *malloc2(size_t);
35
36void *realloc2(void *, size_t);
37
38void *calloc2(size_t, size_t);
39
40void free2(void *);
41
42const char *readable_size(double);
43
44const char *itoa2(long int);
45
46char *remove_char_from_str(char *, char);
47
49
51
53
54zboolean str_is_num(const char *);
55
56zboolean str_is_blank(const char *);
57
58const char *rnd_str(char, int);
59
60#endif /* INC_LIBETM_STR_MEM_H */
zboolean str_is_blank(const char *str)
Definition str_mem.c:499
char * str_n_cpy(char *dest, const char *src, size_t length)
Definition str_mem.c:41
const char * itoa2(long int n)
Definition str_mem.c:350
void free2(void *mem_block)
Definition str_mem.c:243
const char * readable_size(double size_bytes)
Definition str_mem.c:262
char * remove_leading_whitespaces_from_str(char *str)
Definition str_mem.c:389
char * l_str_new(const char *str)
Definition str_mem.c:93
zboolean str_is_num(const char *str2)
Definition str_mem.c:442
const char * rnd_str(char mode, int length)
Definition str_mem.c:528
void * malloc2(size_t size)
Definition str_mem.c:183
void * calloc2(size_t n_elements, size_t element_size)
Definition str_mem.c:221
char * l_str_cat(char *dest, const char *src)
Definition str_mem.c:117
char * remove_trailing_whitespaces_from_str(char *str)
Definition str_mem.c:412
char * remove_surrounding_whitespaces_from_str(char *str)
Definition str_mem.c:429
void * realloc2(void *mem_block, size_t size)
Definition str_mem.c:202
char * remove_char_from_str(char *str, char c)
Definition str_mem.c:369
char * l_str_insert_at_b(char *dest, const char *src)
Definition str_mem.c:151
char * str_n_cat(char *dest, const char *src, size_t length)
Definition str_mem.c:65