rpm 4.15.1

Files | Functions
String Manipulation API.
Data types:

String Manipulation API. More...

Collaboration diagram for String Manipulation API.:

## Files
file | rpmstring.h

## Functions
static RPM_GNUC_CONST int | rislower (int c)
static RPM_GNUC_CONST int | risupper (int c)
static RPM_GNUC_CONST int | risalpha (int c)
static RPM_GNUC_CONST int | risdigit (int c)
static RPM_GNUC_CONST int | risalnum (int c)
static RPM_GNUC_CONST int | risblank (int c)
static RPM_GNUC_CONST int | risspace (int c)
static RPM_GNUC_CONST int | rtolower (int c)
static RPM_GNUC_CONST int | rtoupper (int c)
RPM_GNUC_PURE int | rstrcasecmp (const char *s1, const char *s2)
RPM_GNUC_PURE int | rstrncasecmp (const char *s1, const char *s2, size_t n)
int | rasprintf (char **strp, const char *fmt,...) RPM_GNUC_PRINTF(2
int int | rvasprintf (char **strp, const char *fmt, va_list ap)
char * | rstrcat (char **dest, const char *src)
char * | rstrscat (char **dest, const char *arg,...) RPM_GNUC_NULL_TERMINATED
size_t | rstrlcpy (char *dest, const char *src, size_t n)
RPM_GNUC_PURE unsigned int | rstrhash (const char *string)

## Detailed Description

String Manipulation API.

## Function Documentation

## ◆ rasprintf()

int rasprintf | ( | char ** | strp,
|  | const char * | fmt,
|  |  | ...
| ) |  |

asprintf() clone

## ◆ risalnum()

static RPM_GNUC_CONST int risalnum | ( | int | c | ) |
| inline static

Locale insensitive isalnum(3)

Definition at line 55 of file rpmstring.h.

References risalpha(), and risdigit().

## ◆ risalpha()

static RPM_GNUC_CONST int risalpha | ( | int | c | ) |
| inline static

Locale insensitive isalpha(3)

Definition at line 39 of file rpmstring.h.

References rislower(), and risupper().

Referenced by risalnum().

## ◆ risblank()

static RPM_GNUC_CONST int risblank | ( | int | c | ) |
| inline static

Locale insensitive isblank(3)

Definition at line 63 of file rpmstring.h.

Referenced by risspace().

## ◆ risdigit()

static RPM_GNUC_CONST int risdigit | ( | int | c | ) |
| inline static

Locale insensitive isdigit(3)

Definition at line 47 of file rpmstring.h.

Referenced by risalnum().

## ◆ rislower()

static RPM_GNUC_CONST int rislower | ( | int | c | ) |
| inline static

Locale insensitive islower(3)

Definition at line 23 of file rpmstring.h.

Referenced by risalpha(), and rtoupper().

## ◆ risspace()

static RPM_GNUC_CONST int risspace | ( | int | c | ) |
| inline static

Locale insensitive isspace(3)

Definition at line 71 of file rpmstring.h.

References risblank().

## ◆ risupper()

static RPM_GNUC_CONST int risupper | ( | int | c | ) |
| inline static

Locale insensitive isupper(3)

Definition at line 31 of file rpmstring.h.

Referenced by risalpha(), and rtolower().

## ◆ rstrcasecmp()

RPM_GNUC_PURE int rstrcasecmp | ( | const char * | s1,
|  | const char * | s2
| ) |  |

Locale insensitive strcasecmp(3).

## ◆ rstrcat()

char* rstrcat | ( | char ** | dest,
|  | const char * | src
| ) |  |

Concatenate two strings with dynamically (re)allocated memory.

Parameters

  dest | pointer to destination string
  src | source string

Returns
  realloc'd dest with src appended

## ◆ rstrhash()

RPM_GNUC_PURE unsigned int rstrhash | ( | const char * | string | ) |

String hashing function

Parameters

  string | string to hash

Returns
  hash id

## ◆ rstrlcpy()

size_t rstrlcpy | ( | char * | dest,
|  | const char * | src,
|  | size_t | n
| ) |  |

strlcpy() clone: Copy src to string dest of size n. At most n-1 characters will be copied. Always zero-terminates (unless n == 0). Length of src is returned; if retval >= n, truncation occurred.

Parameters

  dest | destination buffer
  src | string to copy
  n | destination buffer size

Returns
  length of src string

## ◆ rstrncasecmp()

RPM_GNUC_PURE int rstrncasecmp | ( | const char * | s1,
|  | const char * | s2,
|  | size_t | n
| ) |  |

Locale insensitive strncasecmp(3).

## ◆ rstrscat()

char* rstrscat | ( | char ** | dest,
|  | const char * | arg,
|  |  | ...
| ) |  |

Concatenate multiple strings with dynamically (re)allocated memory.

Parameters

  dest | pointer to destination string
  arg | NULL terminated list of strings to concatenate

Returns
  realloc'd dest with strings appended

## ◆ rtolower()

static RPM_GNUC_CONST int rtolower | ( | int | c | ) |
| inline static

Locale insensitive tolower(3)

Definition at line 79 of file rpmstring.h.

References risupper().

## ◆ rtoupper()

static RPM_GNUC_CONST int rtoupper | ( | int | c | ) |
| inline static

Locale insensitive toupper(3)

Definition at line 87 of file rpmstring.h.

References rislower().

## ◆ rvasprintf()

int int rvasprintf | ( | char ** | strp,
|  | const char * | fmt,
|  | va_list | ap
| ) |  |

vasprintf() clone