Changeset 4482bc7 in mainline for uspace/lib/libc/generic/string.c
- Timestamp:
- 2009-04-14T19:21:25Z (15 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade
- Children:
- 6700ee2
- Parents:
- 732bb0c
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/lib/libc/generic/string.c
r732bb0c r4482bc7 530 530 } 531 531 532 /** Append one string to another. 533 * 534 * Append source string @a src to string in destination buffer @a dest. 535 * Size of the destination buffer is @a dest. If the size of the output buffer 536 * is at least one byte, the output string will always be well-formed, i.e. 537 * null-terminated and containing only complete characters. 538 * 539 * @param dst Destination buffer. 540 * @param count Size of the destination buffer. 541 * @param src Source string. 542 */ 543 void str_append(char *dest, size_t size, const char *src) 544 { 545 size_t dstr_size; 546 547 dstr_size = str_size(dest); 548 str_cpy(dest + dstr_size, size - dstr_size, src); 549 } 550 532 551 /** Copy NULL-terminated wide string to string 533 552 * … … 821 840 } 822 841 823 char *strcat(char *dest, const char *src)824 {825 char *orig = dest;826 while (*dest++)827 ;828 --dest;829 while ((*dest++ = *src++))830 ;831 return orig;832 }833 834 842 char *str_dup(const char *src) 835 843 {
Note:
See TracChangeset
for help on using the changeset viewer.