Changes between Version 4 and Version 5 of library_stdlib
- Timestamp:
- Jul 19, 2015, 8:01:22 PM (9 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
library_stdlib
v4 v5 4 4 files define a set of useful functions that do not require a system call. 5 5 6 * int '''atoi'''( char * string )6 == int '''atoi'''( char * string ) == 7 7 This function translate a character string to a signed integer. All characters (but the first) must be digits. 8 8 For a negative value, the first character must be the '-' (minus) character. 9 9 10 * double '''atof'''( char * string )'''10 == double '''atof'''( char * string ) == 11 11 This function translate a character string to a double. Conversion stop at first non-numeric character (except a first '+' or '-' and one '.'). 12 12 13 * void* '''memcpy'''( void* dst, const void* src, unsigned int size )13 == void* '''memcpy'''( void* dst, const void* src, unsigned int size ) == 14 14 This function copies ''size'' bytes from the ''src'' source buffer to the ''dst'' destination buffer. 15 15 16 * void* '''memset'''( void* dst , int s , unsigned int size )16 == void* '''memset'''( void* dst , int s , unsigned int size ) == 17 17 This function initializes ''size'' bytes in the ''dst'' destination buffer, with the value defined by ''(char)s''. 18 18 19 * unsigned int '''strlen'''( char* string )19 == unsigned int '''strlen'''( char* string ) == 20 20 This function returns the number of characters in a string. The terminating NUL character is not taken into account. 21 21 22 * unsigned int '''strcmp'''( char* s1 , char* s2 ) 22 * unsigned int '''strcmp'''( char* s1 , char* s2 ) == 23 23 This function compare the two s1 & s2 strings.It returns 0 if strings are identical (including the terminating NUL character), 24 24 and returns 1 if they are not. 25 25 26 * unsigned int '''strcpy'''( char* dest , char* source )26 == unsigned int '''strcpy'''( char* dest , char* source ) == 27 27 This function copies the source string to the dest string.It returns a pointer on the dest string. 28 28