Ignore:
Timestamp:
Feb 4, 2016, 6:25:22 PM (8 years ago)
Author:
meunier
Message:
  • Ajout de quelques fonction dans la lib math
  • Déplacement de certaines fonctions de stdlib vers string
File:
1 edited

Legend:

Unmodified
Added
Removed
  • soft/giet_vm/giet_libs/string.h

    r607 r777  
    99#define _STRING_H
    1010
    11 char * strcpy ( char * destination, const char * source );
    12 int strcmp ( const char * str1, const char * str2 );
    13 int strlen ( const char * str );
     11////////////////////////////////////////////////////////////////////////////////////////
     12// This function copies the source string to the dest string.
     13// It returns a pointer on the dest string.
     14////////////////////////////////////////////////////////////////////////////////////////
     15char * strcpy(char * destination, const char * source);
     16
     17////////////////////////////////////////////////////////////////////////////////////////
     18// The strncpy() function is similar to strcpy, except that at most n bytes of src
     19// are copied. If there is no null byte among the first n bytes of src, the string
     20// placed in dest will not be null terminated.
     21////////////////////////////////////////////////////////////////////////////////////////
     22char * strncpy(char * dest, const char * src, int n);
     23
     24////////////////////////////////////////////////////////////////////////////////////////
     25//The strcmp() function compares the two strings s1 and s2.  It returns an integer less than, equal to, or greater than zero if s1 is found, respectively, to be less than, to match, or be greater than s2.
     26////////////////////////////////////////////////////////////////////////////////////////
     27int strcmp(const char * str1, const char * str2);
     28
     29////////////////////////////////////////////////////////////////////////////////////////
     30// This function returns the number of characters in a string.
     31// The terminating NULL character is not taken into account.
     32////////////////////////////////////////////////////////////////////////////////////////
     33int strlen(const char * str);
     34
     35////////////////////////////////////////////////////////////////////////////////////////
     36// The strchr() function returns a pointer to the first occurrence of the character c
     37// in the string s.
     38////////////////////////////////////////////////////////////////////////////////////////
     39char * strchr(const char * str, int c);
    1440
    1541#endif
Note: See TracChangeset for help on using the changeset viewer.