strcpy | strncpy | strlcpy. Code with 🚨 🐞 🐞 🚨 Reasoning still Ok

preview_player
Показать описание
😭BUG ALERT🐞
Read the pinned comment.
In the video there is a file.c wrong, i didn’t see while was recording the video. I leave it anyway so you can see what really entails coding ahhaha. This my human brain really sucks!

typedef struct 📖must_read_book 📖
{
} ty_for_support_♥️;

Correct one

Good article to read about this madness of copying a string 😂

00:00:00 Boring, skippable, necessary intro
00:11:03 Actual strcpy
00:17:00 strncpy, 25:42 🐞 BUG | while (n- -) |
00:29:39 strlcpy

typedef struct 🔗s_links🔗
{
} 🔗t_links🔗
Рекомендации по теме
Комментарии
Автор

Hi Oceano, one little thing came to my attention when looking at the diagram, for ft_strncpy, wouldn't it be `while (n - -)` in order to pad dest with null chars since it's iterating ?

NarSero
Автор

bro it's not boring we need video like it your are awesome, just keep going you are really funny :>.

ZobairNajdaoui
Автор

Hey Oceano, great video like always! I have a question, recording the theory comment and the ASCII art 42, etc, is this how you get the exercises during the piscine, or you made it to make your code more stylish?

Автор

Hello,
Question on the strncpy, second half: why the " if " pad \0 multiple time and not only 1? Why it works like a loop here?

vietfox
Автор

2:46 from src to dst, not from dst to src
just for those who get confused :).

ZobairNajdaoui
Автор

for (int i = 0; i<BUF_SIZE; i++)destBuffer[i]='/';
is this the same as:
for (int i = 0; i<BUF_SIZE; i++)
{
destBuffer[i]='/';
}

?

barulli
welcome to shbcf.ru