dpkg 1.22.7-3-g89f48
Loading...
Searching...
No Matches
Data Structures | Functions
string.h File Reference

(dd941b648)

#include <stddef.h>
#include <stdbool.h>
#include <dpkg/macros.h>
Include dependency graph for string.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

struct  str_crop_info
 

Functions

bool str_match_end (const char *str, const char *end)
 Match the end of a string.
 
unsigned int str_fnv_hash (const char *str)
 Fowler/Noll/Vo – FNV-1a simple string hash.
 
char * str_concat (char *dst,...) DPKG_ATTR_SENTINEL
 
char * str_fmt (const char *fmt,...) DPKG_ATTR_PRINTF(1)
 Print formatted output to an allocated string.
 
char * str_escape_fmt (char *dest, const char *src, size_t n)
 Escape format characters from a string.
 
char * str_quote_meta (const char *src)
 Quote shell metacharacters in a string.
 
char * str_strip_quotes (char *str)
 Check and strip possible surrounding quotes in string.
 
char * str_rtrim_spaces (const char *str, char *str_end)
 Trim possible ending spaces in string.
 
int str_width (const char *str)
 Compute the screen width of a string.
 
void str_gen_crop (const char *str, int max_width, struct str_crop_info *crop)
 Generate the crop values for a string given a maximum screen width.