-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmy_string.h
45 lines (29 loc) · 1.31 KB
/
my_string.h
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
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
https://powcoder.com
代写代考加微信 powcoder
Assignment Project Exam Help
Add WeChat powcoder
/*************************************************************************/
/* File Name : my_string.h */
/* Purpose : this header file declares the functions for the */
/* "my_string" library that will mimc those in those */
/* standard "string.h" C-library. */
/* Author(s) : tjf */
/*************************************************************************/
#include <stdio.h>
/* a typedef to save us from writing "unsigned long" */
typedef unsigned long size_t2 ;
/* functions to determine the length of a string */
size_t2 my_strlen (const char *str) ;
size_t2 my_strlen2 (const char *str) ;
/* functions to copy a string */
char* my_strcpy (char *dest, const char *src) ;
char* my_strcpy2 (char *dest, const char *src) ;
/* functions to search a string */
char* my_strchr (const char *str, int c) ;
char* my_strchr2 (const char *str, int c) ;
/* functions to concatenate string */
char* my_strcat (char *dest, const char *src) ;
char* my_strcat2 (char *dest, const char *src) ;
/* functions to compare two strings */
int my_strcmp (const char *str1, const char *str2) ;
int my_strcmp2 (const char *str1, const char *str2) ;