🌈 style:

This commit is contained in:
lzy
2024-05-26 15:39:14 +08:00
parent 6f28a3384a
commit a57bbdb4c1
156 changed files with 765 additions and 770 deletions

View File

@@ -2,9 +2,9 @@
#include <stdlib.h>
char *mystrcpy(char *dest, const char *src)
char* mystrcpy(char* dest, const char* src)
{
char *ret = dest;
char* ret = dest;
if (NULL != dest && NULL != src)
while ((*dest++ = *src++) != '\0')
;
@@ -12,7 +12,7 @@ char *mystrcpy(char *dest, const char *src)
return ret;
}
char *mystrncpy(char *dest, const char *src, size_t n)
char* mystrncpy(char* dest, const char* src, size_t n)
{
int i;
for (i = 0; i < n && (dest[i] = src[i]); i++)
@@ -25,7 +25,7 @@ char *mystrncpy(char *dest, const char *src, size_t n)
}
int main()
int main( )
{
char str1[] = "helloworld";
char str2[128];