diff options
| author | Charles <sircharlesaze@gmail.com> | 2020-04-04 21:28:21 +0200 |
|---|---|---|
| committer | Charles <sircharlesaze@gmail.com> | 2020-04-04 21:28:21 +0200 |
| commit | 42316d8393d32bd88fb8e0cba6825185f78dacd0 (patch) | |
| tree | e9adbd7e5701f70ecba520bbee41d4b21852a1cb /include/libft_dstr.h | |
| parent | 51b845a6a202b50966f50e166cfb11bcbdccbe33 (diff) | |
| download | libft-42316d8393d32bd88fb8e0cba6825185f78dacd0.tar.gz libft-42316d8393d32bd88fb8e0cba6825185f78dacd0.tar.bz2 libft-42316d8393d32bd88fb8e0cba6825185f78dacd0.zip | |
Added test and doc for dynamic string
Diffstat (limited to 'include/libft_dstr.h')
| -rw-r--r-- | include/libft_dstr.h | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/include/libft_dstr.h b/include/libft_dstr.h index 13cb4e3..11bf2f4 100644 --- a/include/libft_dstr.h +++ b/include/libft_dstr.h @@ -6,7 +6,7 @@ /* By: charles <charles.cabergs@gmail.com> +#+ +:+ +#+ */ /* +#+#+#+#+#+ +#+ */ /* Created: 2020/04/03 10:39:51 by charles #+# #+# */ -/* Updated: 2020/04/03 15:10:54 by charles ### ########.fr */ +/* Updated: 2020/04/04 21:18:48 by charles ### ########.fr */ /* */ /* ************************************************************************** */ @@ -18,6 +18,13 @@ # include "libft_str.h" # include "libft_mem.h" +/* +** \brief Dynamic string struct +** \param str Underlying null-terminated character array +** \param length Number of character (not including the '\0') +** \param capacity Maximum length - 1 of the current string +*/ + typedef struct s_ftdstr { char *str; @@ -30,6 +37,6 @@ void ft_dstrdestroy(t_ftdstr *dstr); t_ftdstr *ft_dstrgrow(t_ftdstr *dstr, size_t at_least); char *ft_dstrunwrap(t_ftdstr *dstr); t_ftdstr *ft_dstrinsert(t_ftdstr *dstr, char *inserted, size_t i); -// t_ftdstr *ft_dstrreplace(t_ftdstr *dstr, char *from, char *to); +// t_ftdstr *ft_dstrsubstitute(t_ftdstr *dstr, char *sub, size_t start, size_t end); #endif |
