Platon Technologies
not logged in Login Registration
EnglishSlovak
open source software development celebrating 10 years of open source development! Saturday, October 17, 2026

Diff for libcfg+/src/platon/str/strplus.c between version 1.21 and 1.22

version 1.21, 2002/12/04 18:18:39 version 1.22, 2002/12/09 16:14:36
Line 202  PLATON_FUNC(strdel)(s)
Line 202  PLATON_FUNC(strdel)(s)
 {  {
         register int i;          register int i;
   
         /* XXX: memmove() will be probably faster here */  #if 1
           return memmove(s, s + 1, strlen(s));
   #else
         for (i = 0; s[i] != '\0'; i++)          for (i = 0; s[i] != '\0'; i++)
                 s[i] = s[i + 1];                  s[i] = s[i + 1];
   
         return s;          return s;
   #endif
 }  }
   
         char *          char *
Line 405  main(argc, argv)
Line 408  main(argc, argv)
                         TESTSTR2,                          TESTSTR2,
                         PLATON_FUNC(str_trim_whitechars)(str2));                          PLATON_FUNC(str_trim_whitechars)(str2));
   
           printf("strdel(\"%s\") = ", str2);
           printf("\"%s\"\n", PLATON_FUNC(strdel)(str2));
   
         printf("strrev(\"%s\") = ", str2);          printf("strrev(\"%s\") = ", str2);
         printf("\"%s\"\n", PLATON_FUNC(strrev)(str2));          printf("\"%s\"\n", PLATON_FUNC(strrev)(str2));
         strrev(str2); /* Reversing back, just for sure */          strrev(str2); /* Reversing back, just for sure */
   
         free(str2);          free(str2);
   
         puts("\nEntering strins_selftest():");          puts("\nEntering strins_selftest():");

Legend:
Removed from v.1.21  
changed lines
  Added in v.1.22

Platon Group <platon@platon.org> http://platon.org/
Copyright © 2002-2006 Platon Group
Site powered by Metafox CMS
Go to Top