ft_strtrim()

This commit is contained in:
lalgarra 2025-10-08 22:00:12 +02:00
parent 998010436e
commit 337475e022
2 changed files with 8 additions and 2 deletions

View file

@ -0,0 +1,6 @@
test 1: str1:[Lorem], result:[Lorem]
test 2: str1:[ Lorem ], result:[Lorem]
test 3: str1:[ Lorem ], result:[ore]
test 4: str1:[ ], result:[]
test 5: str1:[-NULL-], result:[]
test 6: str1:[Lorem], result:[Lorem]

View file

@ -6,7 +6,7 @@
/* By: lalgarra <lalgarra@student.42madrid.com> +#+ +:+ +#+ */ /* By: lalgarra <lalgarra@student.42madrid.com> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */ /* +#+#+#+#+#+ +#+ */
/* Created: 2025/10/08 20:50:12 by lalgarra #+# #+# */ /* Created: 2025/10/08 20:50:12 by lalgarra #+# #+# */
/* Updated: 2025/10/08 21:32:34 by lalgarra ### ########.fr */ /* Updated: 2025/10/08 21:53:15 by lalgarra ### ########.fr */
/* */ /* */
/* ************************************************************************** */ /* ************************************************************************** */
@ -45,6 +45,6 @@ int main(void)
test("test 3: ", " Lorem ", " Lm"); test("test 3: ", " Lorem ", " Lm");
test("test 4: ", " ", " "); test("test 4: ", " ", " ");
test("test 5: ", (void *)0, " "); test("test 5: ", (void *)0, " ");
test("test 1: ", "Lorem", (void *)0); test("test 6: ", "Lorem", (void *)0);
return (0); return (0);
} }