어떤 메모리 블록의 시작 주소\*Dst부터 연속된 바이트 크기Size를 어떤 값Val으로 채울 때 사용하는 함수. int_Val : 초기화할 값 (int로 전달되지만 함수 내부에선 unsigned char로 형변환되어 사용)size_t Size : Val로 채울 바이트
\*ptr부터 size바이트만큼 0으로 채움.void \*ptr : 채우고자 하는 메모리 시작 주소size_t size : 채우고자 하는 바이트 수없음
Src가 가리키는 곳 부터 Size바이트 만큼 Dst이 가리키는 곳으로 복사Dst : 데이터 복사될 시작 주소. void\*형으로 변환되어서 전달Src : 복사할 데이터들이 위치한 주소. void\*형으로 변환되어서 전달Size : 복사할 데이터의 바이트 수.Dstme
The memccpy() function copies no more than Size bytes from memmory area Src to memory area Dst, stopping when the character Val is found. if the memor
src가 가리키는 곳부터 num바이트 만큼 dst이 가리키는 곳으로 옮긴다.💡dst < src : 순차적으로 복사💡dst > src : 뒤에서부터 복사dst : 데이터가 복사될 곳을 가리키는 포인터. void\*형src : 복사할 데이터가 있는 위치를 가리키는
The memchr() function shall locate the first occurrence of c (converted to an unsigned char) in the initial n bytes (each interpreted as unsigned char
The memcmp() function compares the first n bytes (each interpreted as unsigned char) of the memory areas s1 and s2.s1와 s2두 메모리를 n바이트 만큼 비교.s1, s2 : 비
calculate the length of a stringThe strlen() function calculates the length of the string pointedto by s, excluding the terminating null byte \`('\\0'
Copy a NULL terminated string into a sized bufferdst에 src를 size - 1 만큼 복사.dst : Where to copy the string tosrc : Where to copy the string fromdstsize
✅strlcat src를 dst의 끝에 추가해주는 함수 💾함수 원형 💻Parameters dst : The string to be appended to src : The string to append to it dstsize : The size of the
문자열에서 특정 문자를 찾을 때 사용.s : 검색할 문자열c : 찾을 문자문자를 찾은 첫번째 포인터.없을 때는 Null
문자열의 뒤에서부터 앞쪽으로 문자 검색.s : 검색 대상 문자열c : 찾는 문자s문자열의 끝에서부터 문자열의 앞쪽으로 c를 처음 만난 곳의 포인터를 리턴없으면 NULL 반환.
big문자열의 len길이 중에서 little문자열을 찾는 것.big : 탐색할 문자열little : 찾아야하는 문자열len : big문자열 내 탐색할 범위char \*형으로 리턴little을 찾았을 경우 문자열 중 첫글자를 가리키는 포인터를 리턴.little을 찾지 못
두 문자열의 일부문자들을 비교.str1의 처음 num개의 문자와 str2의 처음 num개의 문자를 비교.num개의 문자를 비교할 때까지 or NULL에 도달할 때까지 비교.str1, str2 : 비교할 문자열num : 비교할 문자 개수같을 때 0str1이 크면 양의 정
Ascii string To Integer문자열을 정수로 변환선행 whitespace는 무시s : 문자열변환 가능한 정수, 없을 시 0
알파벳인지 알려주는 함수.알파벳이 아닐 경우 0알파벳일 경우 0 이 아닌 수
c가 ASCII코드 값중 숫자 문장인지 판별숫자가 아닐 경우 0숫자일 경우 0 이 아닌 수
c가 알파벳 또는 숫자인지 판별.숫자나 영문자이면 0이 아닌 값 리턴 ▶ 참숫자나 영문자가 아니면 0을 리턴 ▶ 거짓
ACSII문자인지 판별하는 함수.c : 판별할 문자ASCII일 경우 0이 아닌 수ASCII가 아닐 경우 0(테스트 출처: https://jesus12.tistory.com/entry/C언어-isascii-함수-구현하기)
출력 가능한 문자인지 판별하는 함수.c : 판별할 문자출력 가능한 문자(공백 문자도 포함)이면 0이 아닌 수출력 불가능한 문자 => 0
알파벳 소문자를 대문자로 변환해주는 함수
알파벳 대문자를 소문자로 변환한다.
malloc과 달리 할당된 공간의 값을 모두 0으로 바꾼다.size크기의 변수를 count개 만큼 저장할 수 있는 메모리 공간을 할당.할당된 메모리 공간을 0으로 초기화malloc : 메모리를 동적으로 할당하는 함수(heap 영역)free : heap 영역에 할당된 메
포인터s가 가리키는 문자열을 복사하고, 복사된 문자열에 대한 포인터를 반환s : 복사할 문자열string을 복사한 메모리주소(복사된 문자열의 주소를 가리키는 포인터)실패 시 NULL
Allocates (with malloc(3)) and returns a substringfrom the string ’s’.The substring begins at index ’start’ and is ofmaximum size ’len’.문자열을 자를 때 사용하는
Allocates (with malloc(3)) and returns a new string, which is the result of the concatenationof s1 and s2.s1과 s2를 연결한 새 문자열 반환s1 : The prefix string.s
Allocates (with malloc(3)) and returns a copy ofs1 with the characters specified in set removedfrom the beginning and the end of the string.문자열에서 set에
작성중...
Allocates (with malloc(3)) and returns a stringrepresenting the integer received as an argument.Negative numbers must be handled.정수 -> 문자열 변환n : the i
Applies the function f to each character of thestring s to create a new string (with malloc(3))resulting from successive applications of f.s : The str
Outputs the character ’c’ to the given file descriptor.c를 파일스크립터로 출력c : The character to output.fd : The file descriptor on which to write.None
Outputs the string ’s’ to the given filedescriptor.None
Outputs the string s to the given filedescriptor, followed by a newline.ft_putstr_fd + a newlines : The string to output.fd : The file descriptor on w
Outputs the integer n to the given file descriptor.n : The integer to output.fd : The file descriptor on which to write.None💡오버플로우 때문에 -2147483648만 따