mirror of
https://github.com/zoriya/Twac.git
synced 2026-06-04 02:55:59 +00:00
Starting to create the map
This commit is contained in:
+1
-1
Submodule lib/gamacon updated: 05232ad744...92c4a2bd75
@@ -0,0 +1,21 @@
|
||||
/*
|
||||
** EPITECH PROJECT, 2019
|
||||
** Str dup replicate
|
||||
** File description:
|
||||
** MALLOC YES
|
||||
*/
|
||||
|
||||
#include <stdlib.h>
|
||||
|
||||
int my_strlen(const char *src);
|
||||
|
||||
char *my_strdup(const char *src)
|
||||
{
|
||||
int length = my_strlen(src);
|
||||
char *ret = malloc(sizeof(char) * (length + 1));
|
||||
|
||||
for (int i = 0; i < length; i++)
|
||||
ret[i] = src[i];
|
||||
ret[length] = '\0';
|
||||
return (ret);
|
||||
}
|
||||
@@ -0,0 +1,16 @@
|
||||
/*
|
||||
** EPITECH PROJECT, 2019
|
||||
** CPool_Day04_2019
|
||||
** File description:
|
||||
** Strlen
|
||||
*/
|
||||
|
||||
int my_strlen(const char *str)
|
||||
{
|
||||
if (str == 0)
|
||||
return (0);
|
||||
for (int i = 0; 1; i++) {
|
||||
if (*(str + i) == '\0')
|
||||
return i;
|
||||
}
|
||||
}
|
||||
+1
-1
Submodule lib/xmlparser updated: e24bce0d48...ef87688c73
Reference in New Issue
Block a user