Ignore:
Timestamp:
Dec 5, 2001, 9:37:33 PM (24 years ago)
Author:
umoeller
Message:

Misc changes.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/helpers/xstring.c

    r111 r121  
    8585
    8686/*
    87  *      Copyright (C) 1999-2000 Ulrich M”ller.
     87 *      Copyright (C) 1999-2001 Ulrich M”ller.
    8888 *      This file is part of the "XWorkplace helpers" source package.
    8989 *      This is free software; you can redistribute it and/or modify
     
    220220{
    221221    if (!pszNew)
    222     {
    223222        memset(pxstr, 0, sizeof(XSTRING));
    224     }
    225223    else
    226224    {
     
    792790 +          //                             1         2
    793791 +
    794  +          xstrInitCopy(&xstrReplacement, "stupid");
    795  +
    796792 +          xstrrpl(&xstr,
    797793 +                  10,     // position of "test"
    798794 +                  4,      // length of "test"
    799  +                  &xstrReplacement);
     795 +                  "stupid",
     796 +                  6);     // strlen("stupid")
    800797 *
    801798 *      This would yield "This is a stupid string."
     
    878875            {
    879876                // 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
    888880                // V0.9.11 (2001-04-22) [umoeller]
    889 
    890881                memcpy(pszNew + ulFirstReplOfs,
    891882                       pcszReplaceWith,
Note: See TracChangeset for help on using the changeset viewer.