Browse Source

Fix files rights. Add ft_strdup_till function.

Moul 4 years ago
parent
commit
315b71211e
69 changed files with 20 additions and 0 deletions
  1. 1 0
      Makefile
  2. 0 0
      auteur
  3. 0 0
      ft_atoi.c
  4. 0 0
      ft_bzero.c
  5. 0 0
      ft_isalnum.c
  6. 0 0
      ft_isalpha.c
  7. 0 0
      ft_isascii.c
  8. 0 0
      ft_isdigit.c
  9. 0 0
      ft_isprint.c
  10. 0 0
      ft_itoa.c
  11. 0 0
      ft_lstadd.c
  12. 0 0
      ft_lstdel.c
  13. 0 0
      ft_lstdelone.c
  14. 0 0
      ft_lstiter.c
  15. 0 0
      ft_lstmap.c
  16. 0 0
      ft_lstnew.c
  17. 0 0
      ft_memalloc.c
  18. 0 0
      ft_memccpy.c
  19. 0 0
      ft_memchr.c
  20. 0 0
      ft_memcmp.c
  21. 0 0
      ft_memcpy.c
  22. 0 0
      ft_memdel.c
  23. 0 0
      ft_memmove.c
  24. 0 0
      ft_memset.c
  25. 0 0
      ft_putchar.c
  26. 0 0
      ft_putchar_fd.c
  27. 0 0
      ft_putendl.c
  28. 0 0
      ft_putendl_fd.c
  29. 0 0
      ft_putnbr.c
  30. 0 0
      ft_putnbr_fd.c
  31. 0 0
      ft_putnbrn.c
  32. 0 0
      ft_putstr.c
  33. 0 0
      ft_putstr_fd.c
  34. 0 0
      ft_puttab.c
  35. 0 0
      ft_strcat.c
  36. 0 0
      ft_strchr.c
  37. 0 0
      ft_strclr.c
  38. 0 0
      ft_strcmp.c
  39. 0 0
      ft_strcpy.c
  40. 0 0
      ft_strdel.c
  41. 0 0
      ft_strdup.c
  42. 18 0
      ft_strdup_till.c
  43. 0 0
      ft_strequ.c
  44. 0 0
      ft_striter.c
  45. 0 0
      ft_striteri.c
  46. 0 0
      ft_strjoin.c
  47. 0 0
      ft_strjoinf.c
  48. 0 0
      ft_strlcat.c
  49. 0 0
      ft_strlen.c
  50. 0 0
      ft_strmap.c
  51. 0 0
      ft_strmapi.c
  52. 0 0
      ft_strncat.c
  53. 0 0
      ft_strncmp.c
  54. 0 0
      ft_strncpy.c
  55. 0 0
      ft_strndup.c
  56. 0 0
      ft_strnequ.c
  57. 0 0
      ft_strnew.c
  58. 0 0
      ft_strnstr.c
  59. 0 0
      ft_strrchr.c
  60. 0 0
      ft_strsplit.c
  61. 0 0
      ft_strstr.c
  62. 0 0
      ft_strsub.c
  63. 0 0
      ft_strtrim.c
  64. 0 0
      ft_tabsize.c
  65. 0 0
      ft_tolower.c
  66. 0 0
      ft_toupper.c
  67. 0 0
      get_next_line.c
  68. 0 0
      get_next_line.h
  69. 1 0
      libft.h

+ 1 - 0
Makefile

@@ -22,6 +22,7 @@ ft_memcmp.c \
 ft_strlen.c \
 ft_strdup.c \
 ft_strndup.c \
+ft_strdup_till.c \
 ft_strcpy.c \
 ft_strncpy.c \
 ft_strcat.c \

+ 0 - 0
auteur


+ 0 - 0
ft_atoi.c


+ 0 - 0
ft_bzero.c


+ 0 - 0
ft_isalnum.c


+ 0 - 0
ft_isalpha.c


+ 0 - 0
ft_isascii.c


+ 0 - 0
ft_isdigit.c


+ 0 - 0
ft_isprint.c


+ 0 - 0
ft_itoa.c


+ 0 - 0
ft_lstadd.c


+ 0 - 0
ft_lstdel.c


+ 0 - 0
ft_lstdelone.c


+ 0 - 0
ft_lstiter.c


+ 0 - 0
ft_lstmap.c


+ 0 - 0
ft_lstnew.c


+ 0 - 0
ft_memalloc.c


+ 0 - 0
ft_memccpy.c


+ 0 - 0
ft_memchr.c


+ 0 - 0
ft_memcmp.c


+ 0 - 0
ft_memcpy.c


+ 0 - 0
ft_memdel.c


+ 0 - 0
ft_memmove.c


+ 0 - 0
ft_memset.c


+ 0 - 0
ft_putchar.c


+ 0 - 0
ft_putchar_fd.c


+ 0 - 0
ft_putendl.c


+ 0 - 0
ft_putendl_fd.c


+ 0 - 0
ft_putnbr.c


+ 0 - 0
ft_putnbr_fd.c


+ 0 - 0
ft_putnbrn.c


+ 0 - 0
ft_putstr.c


+ 0 - 0
ft_putstr_fd.c


+ 0 - 0
ft_puttab.c


+ 0 - 0
ft_strcat.c


+ 0 - 0
ft_strchr.c


+ 0 - 0
ft_strclr.c


+ 0 - 0
ft_strcmp.c


+ 0 - 0
ft_strcpy.c


+ 0 - 0
ft_strdel.c


+ 0 - 0
ft_strdup.c


+ 18 - 0
ft_strdup_till.c

@@ -0,0 +1,18 @@
+/* ************************************************************************** */
+/*                                                                            */
+/*                                                        :::      ::::::::   */
+/*   ft_strdup_till.c                                   :+:      :+:    :+:   */
+/*                                                    +:+ +:+         +:+     */
+/*   By: mazimi <mazimi@student.42.fr>              +#+  +:+       +#+        */
+/*                                                +#+#+#+#+#+   +#+           */
+/*   Created: 2014/11/08 17:49:42 by mazimi            #+#    #+#             */
+/*   Updated: 2014/12/26 12:58:54 by mazimi           ###   ########.fr       */
+/*                                                                            */
+/* ************************************************************************** */
+
+#include "libft.h"
+
+char	*ft_strdup_till(char *str, char c)
+{
+	return (ft_strndup(str, ft_strlen(str) - ft_strlen(ft_strchr(str, c))));
+}

+ 0 - 0
ft_strequ.c


+ 0 - 0
ft_striter.c


+ 0 - 0
ft_striteri.c


+ 0 - 0
ft_strjoin.c


+ 0 - 0
ft_strjoinf.c


+ 0 - 0
ft_strlcat.c


+ 0 - 0
ft_strlen.c


+ 0 - 0
ft_strmap.c


+ 0 - 0
ft_strmapi.c


+ 0 - 0
ft_strncat.c


+ 0 - 0
ft_strncmp.c


+ 0 - 0
ft_strncpy.c


+ 0 - 0
ft_strndup.c


+ 0 - 0
ft_strnequ.c


+ 0 - 0
ft_strnew.c


+ 0 - 0
ft_strnstr.c


+ 0 - 0
ft_strrchr.c


+ 0 - 0
ft_strsplit.c


+ 0 - 0
ft_strstr.c


+ 0 - 0
ft_strsub.c


+ 0 - 0
ft_strtrim.c


+ 0 - 0
ft_tabsize.c


+ 0 - 0
ft_tolower.c


+ 0 - 0
ft_toupper.c


+ 0 - 0
get_next_line.c


+ 0 - 0
get_next_line.h


+ 1 - 0
libft.h

@@ -36,6 +36,7 @@ int					ft_memcmp(const void *s1, const void *s2, size_t n);
 size_t				ft_strlen(char const *str);
 char				*ft_strdup(const char *s1);
 char				*ft_strndup(const char *s1, int n);
+char				*ft_strdup_till(char *str, char c);
 char				*ft_strcpy(char *dest, const char *src);
 char				*ft_strncpy(char *dest, char *src, unsigned int n);
 char				*ft_strcat(char *s1, const char *s2);