source: soft/giet_vm/giet_libs/string.h @ 777

Last change on this file since 777 was 777, checked in by meunier, 8 years ago
  • Ajout de quelques fonction dans la lib math
  • Déplacement de certaines fonctions de stdlib vers string
  • Property svn:executable set to *
File size: 2.4 KB
Line 
1//////////////////////////////////////////////////////////////////////////////////
2// File     : string.h
3// Date     : 23/05/2013
4// Author   : Alexandre JOANNOU, Laurent LAMBERT
5// Copyright (c) UPMC-LIP6
6///////////////////////////////////////////////////////////////////////////////////
7
8#ifndef _STRING_H
9#define _STRING_H
10
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);
40
41#endif
42
43// Local Variables:
44// tab-width: 4
45// c-basic-offset: 4
46// c-file-offsets:((innamespace . 0)(inline-open . 0))
47// indent-tabs-mode: nil
48// End:
49// vim: filetype=c:expandtab:shiftwidth=4:tabstop=4:softtabstop=4
Note: See TracBrowser for help on using the repository browser.