Changeset 16da5f8e in mainline for kernel/generic/src/lib/memstr.c


Ignore:
Timestamp:
2009-03-02T21:18:15Z (16 years ago)
Author:
Jiri Svoboda <jirik.svoboda@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
20f1597
Parents:
8dc72b64
Message:

String functions should be declared in string.h (and implemented in string.c) in the kernel.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • kernel/generic/src/lib/memstr.c

    r8dc72b64 r16da5f8e  
    161161}
    162162
    163 /** Copy string.
    164  *
    165  * Copy string from src address to dst address.  The copying is done
    166  * char-by-char until the null character. The source and destination memory
    167  * areas cannot overlap.
    168  *
    169  * @param src           Source string to copy from.
    170  * @param dst           Destination string to copy to.
    171  *
    172  * @return              Address of the destination string.
    173  */
    174 char *strcpy(char *dest, const char *src)
    175 {
    176         char *orig = dest;
    177        
    178         while ((*(dest++) = *(src++)))
    179                 ;
    180         return orig;
    181 }
    182 
    183163/** @}
    184164 */
Note: See TracChangeset for help on using the changeset viewer.