알파벳 대문자라면 소문자로 바꿔주는 함수
int ft_tolower(int c)
🔩 parameter
int c -> 알파벳 대문자인지 소문자인지 확인하고 바꿔줄 값
📬 return
int형 반환
- c가 알파벳 대문자라면 소문자로 바꿔준 뒤 반환
- c가 알파벳 대문자가 아니라면 그대로 반환
알파벳 소문자와 대문자는 ascii코드 10진수로 32가 차이남.
ex) a == 97, A == 65
#include "libft.h"
int ft_tolower(int c)
{
if (c >= 65 && c <= 90)
{
c += 32;
}
return (c);
}
Hey J_JEON, you need to change the sub headlines from ft_toupper to ft_tolower. I guess you just copied everything from the previous post, i.e. ft_toupper and forgot to change the sub headlines. I just found your blogs and your blogs have been very important resources for my cursus. Thank you.