source: CIVL/include/headers/strings.h@ a389857

main test-branch
Last change on this file since a389857 was ea777aa, checked in by Alex Wilton <awilton@…>, 3 years ago

Moved examples, include, build_default.properties, common.xml, and README out from dev.civl.com into the root of the repo.

git-svn-id: svn://vsl.cis.udel.edu/civl/trunk@5704 fb995dde-84ed-4084-dfe6-e5aef3e2452c

  • Property mode set to 100644
File size: 1.9 KB
Line 
1/* strings.h: The ABC representation of non-standard C library.
2 * strings.h is useful but non-standard strings header file.
3 * Based on C11 Standard.
4 */
5#ifndef _STRINGS_
6#define _STRINGS_
7
8#include <stddef.h>
9
10/* Functions */
11
12/* Compare bytes in memory. The bcmp() function compares the
13 * first n bytes of the area pointed to by s1 (first parameter)
14 * with the area pointed to by s2(the second parameter).
15 */
16int bcmp(const void *, const void *, size_t);
17
18/* Copy bytes in memory. The bcopy() function copies n bytes from
19 * the area pointed to by s1 to the area pointed to by s2
20 * using the memcpy() function.
21 */
22void bcopy(const void *, void *, size_t);
23
24/* Zero bytes in memory. The bzero() function places n zero-valued
25 * bytes in the area pointed to by s(first parameter)
26 */
27void bzero(void *, size_t);
28
29/* Find first set bit. The ffs() function shall find the first bit
30 * set (beginning with the least significant bit) in i, and return
31 * the index of that bit. Bits are numbered starting at
32 * one (the least significant bit).
33 */
34int ffs(int);
35
36/* index, rindex - locate character in string.
37 * The index() function returns a pointer to the
38 * first occurrence of the character c in the string s.
39 * The rindex() function returns a pointer to the last
40 * occurrence of the character c in the string s.
41 */
42char *index(const char *, int);
43char *rindex(const char *, int);
44
45/* strcasecmp, strncasecmp -- case-insensitive string comparisons.
46 * The strcasecmp() function shall compare, while ignoring differences
47 * in case, the string pointed to by s1 to the string pointed to by s2.
48 * The strncasecmp() function shall compare, while ignoring differences in case,
49 * not more than n bytes from the string pointed to by s1 to the string
50 * pointed to by s2.
51 */
52int strcasecmp(const char *, const char *);
53int strncasecmp(const char *, const char *, size_t);
54
55#endif
Note: See TracBrowser for help on using the repository browser.