-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathft_fw_right.c
28 lines (25 loc) · 1.12 KB
/
ft_fw_right.c
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
/* ************************************************************************** */
/* */
/* ::: :::::::: */
/* ft_fw_right.c :+: :+: :+: */
/* +:+ +:+ +:+ */
/* By: ohachim <[email protected]> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2019/03/10 23:41:42 by ohachim #+# #+# */
/* Updated: 2019/03/10 23:41:46 by ohachim ### ########.fr */
/* */
/* ************************************************************************** */
#include "libft.h"
char *ft_fw_right(t_rem *rems, char *num)
{
char *temp;
char *padds;
int len;
len = ft_strlen(num);
padds = ft_make_s(rems->fi_wi - len, ' ');
temp = num;
num = ft_strjoin(temp, padds);
free(padds);
free(temp);
return (num);
}