mirror of
https://github.com/renbaoshuo/202401-programming-assignments.git
synced 2024-12-16 15:44:39 +00:00
13 lines
206 B
C
13 lines
206 B
C
void strmcpy(char *src, int begin_idx, char *dst) {
|
|
int len = strlen(src);
|
|
|
|
begin_idx--;
|
|
|
|
for (int i = begin_idx; i < len; i++) {
|
|
*dst = src[i];
|
|
dst++;
|
|
}
|
|
|
|
*dst = '\0';
|
|
}
|