File: str.h

package info (click to toggle)
bmf 0.9.4-9
  • links: PTS, VCS
  • area: main
  • in suites: jessie, jessie-kfreebsd, wheezy
  • size: 388 kB
  • ctags: 428
  • sloc: ansic: 5,517; sh: 322; makefile: 132
file content (30 lines) | stat: -rw-r--r-- 762 bytes parent folder | download | duplicates (6)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
/* $Id: str.h,v 1.1.1.1 2002/09/30 21:08:29 tommy Exp $ */

/*
 * Copyright (c) 2002 Tom Marshall <tommy@tig-grr.com>
 *
 * This program is free software.  It may be distributed under the terms
 * in the file LICENSE, found in the top level of the distribution.
 */

#ifndef _STR_H
#define _STR_H

/* a couple of generic string functions... */
void strlwr( char* s );
void strcpylwr( char* d, const char* s );
void strncpylwr( char* d, const char* s, int n );

typedef struct _str
{
    char*       p;
    uint        len;
} str_t;

void    str_create ( str_t* pthis );
void    str_destroy( str_t* pthis );

int     str_cmp    ( const str_t* pthis, const str_t* pother );
int     str_casecmp( const str_t* pthis, const str_t* pother );

#endif /* ndef _STR_H */