rpmstring.h File Reference

String manipulation helper functions. More...

#include <stddef.h>
#include <string.h>
#include <rpm/rpmutil.h>
Include dependency graph for rpmstring.h:

Go to the source code of this file.

Defines

#define appendStringBuf(sb, s)   appendStringBufAux(sb, s, 0)
#define appendLineStringBuf(sb, s)   appendStringBufAux(sb, s, 1)

Typedefs

typedef struct StringBufRec * StringBuf

Functions

static int rislower (int c)
 Locale insensitive islower(3).
static int risupper (int c)
 Locale insensitive isupper(3).
static int risalpha (int c)
 Locale insensitive isalpha(3).
static int risdigit (int c)
 Locale insensitive isdigit(3).
static int risalnum (int c)
 Locale insensitive isalnum(3).
static int risblank (int c)
 Locale insensitive isblank(3).
static int risspace (int c)
 Locale insensitive isspace(3).
static int rtolower (int c)
 Locale insensitive tolower(3).
static int rtoupper (int c)
 Locale insensitive toupper(3).
static unsigned char rnibble (char c)
 Convert hex to binary nibble.
static int rstreq (const char *s1, const char *s2)
 Test for string equality.
static int rstreqn (const char *s1, const char *s2, size_t n)
 Test for string equality.
int rstrcasecmp (const char *s1, const char *s2)
 Locale insensitive strcasecmp(3).
int rstrncasecmp (const char *s1, const char *s2, size_t n)
 Locale insensitive strncasecmp(3).
int rasprintf (char **strp, const char *fmt,...)
 asprintf() clone
char * rstrcat (char **dest, const char *src)
 Concatenate two strings with dynamically (re)allocated memory.
char * rstrscat (char **dest, const char *arg,...)
 Concatenate multiple strings with dynamically (re)allocated memory.
size_t rstrlcpy (char *dest, const char *src, size_t n)
 strlcpy() clone: Copy src to string dest of size n.
char * stripTrailingChar (char *s, char c)
 Remove occurences of trailing character from string.
StringBuf newStringBuf (void)
StringBuf freeStringBuf (StringBuf sb)
void truncStringBuf (StringBuf sb)
char * getStringBuf (StringBuf sb)
void stripTrailingBlanksStringBuf (StringBuf sb)
void appendStringBufAux (StringBuf sb, const char *s, int nl)

Detailed Description

String manipulation helper functions.

Definition in file rpmstring.h.


Function Documentation

static unsigned char rnibble ( char  c  )  [inline, static]

Convert hex to binary nibble.

Parameters:
c hex character
Returns:
binary nibble

Definition at line 96 of file rpmstring.h.

static int rstreq ( const char *  s1,
const char *  s2 
) [inline, static]

Test for string equality.

Parameters:
s1 string 1
s2 string 2
Returns:
0 if strings differ, 1 if equal

Definition at line 113 of file rpmstring.h.

Referenced by buildForTarget(), and main().

static int rstreqn ( const char *  s1,
const char *  s2,
size_t  n 
) [inline, static]

Test for string equality.

Parameters:
s1 string 1
s2 string 2
n compare at most n characters
Returns:
0 if strings differ, 1 if equal

Definition at line 125 of file rpmstring.h.

Generated by  doxygen 1.6.2-20100208