I'm trying to write my own versions of strcat, strcpy and strcmp... They work fine right now it seems
but I would appreciate any comments and/or suggestions how to make them better ( I assume they aren't perfect )
if you know of good corrections which should be made.
//My own strcat...
char* strcat(char text1, char text2)
int i=0, j=0;
while ((int)text2[j] >0)
if ((int)text1[i] > 0)
text1[i] = text2[j];
//My own strcpy...
char *strcpy(char text1, char text2)
while ((int)text2[k] > 0)
text1[k] = text2[k];
} text1[k] = '\0';
// My own strcmp...
bool strcmp(char text1, char text2)
while ((int)text1[i] == (int)text2[i] && (int)text1[i] > 0)
if (text1[i] == text2[i])
else return false;