Changeset 121 for trunk/src/helpers/xstring.c
- Timestamp:
- Dec 5, 2001, 9:37:33 PM (24 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/helpers/xstring.c
r111 r121 85 85 86 86 /* 87 * Copyright (C) 1999-200 0Ulrich Mller.87 * Copyright (C) 1999-2001 Ulrich Mller. 88 88 * This file is part of the "XWorkplace helpers" source package. 89 89 * This is free software; you can redistribute it and/or modify … … 220 220 { 221 221 if (!pszNew) 222 {223 222 memset(pxstr, 0, sizeof(XSTRING)); 224 }225 223 else 226 224 { … … 792 790 + // 1 2 793 791 + 794 + xstrInitCopy(&xstrReplacement, "stupid");795 +796 792 + xstrrpl(&xstr, 797 793 + 10, // position of "test" 798 794 + 4, // length of "test" 799 + &xstrReplacement); 795 + "stupid", 796 + 6); // strlen("stupid") 800 797 * 801 798 * This would yield "This is a stupid string." … … 878 875 { 879 876 // we have a replacement: 880 // insert it next 881 882 /* memcpy(pszNew + ulFirstReplOfs, 883 pstrReplaceWith->psz, 884 cReplaceWithLen + 1); // include null terminator 885 */ 886 // no, we no longer can be sure that pcszReplaceWith is 887 // null terminated, so terminate explicitly 877 // insert it next... 878 // we no longer can be sure that pcszReplaceWith 879 // is null terminated, so terminate explicitly 888 880 // V0.9.11 (2001-04-22) [umoeller] 889 890 881 memcpy(pszNew + ulFirstReplOfs, 891 882 pcszReplaceWith,
Note:
See TracChangeset
for help on using the changeset viewer.