Changeset 65 for trunk/src/helpers/xstring.c
- Timestamp:
- Apr 29, 2001, 2:10:31 PM (24 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/helpers/xstring.c
r63 r65 523 523 * If pxstr is empty, this behaves just like xstrcpy. 524 524 * 525 * With ulSourceLength, specify the length of pcszSource. 526 * If you specify 0, this function will run strlen(pcszSource) 527 * itself. 528 * 529 * If you already know the length of pcszSource, you can 530 * speed this function up a bit this way. 531 * 532 * You are required to specify ulSourceLength if you only want 533 * to copy a substring, or pcszSource is not zero-terminated. 525 * With ulSourceLength, specify the length of pcszSource 526 * or 0 (see xstrcpy for details). 534 527 * 535 528 * Returns the length of the new string (excluding the null … … 590 583 memcpy(pxstr->psz + pxstr->ulLength, 591 584 pcszSource, 592 ulSourceLength); // null terminator585 ulSourceLength); 593 586 594 587 *(pxstr->psz + pxstr->ulLength + ulSourceLength) = '\0'; … … 629 622 + XSTRING str; 630 623 + xstrInit(&str, 0); 631 + xstrcpy(&str, "blu" );624 + xstrcpy(&str, "blu", 0); 632 625 + xstrcatc(&str, 'p'); 633 626 *
Note:
See TracChangeset
for help on using the changeset viewer.