STASIS
A pipeline delivery generator
Toggle main menu visibility
Loading...
Searching...
No Matches
src
lib
core
include
str.h
Go to the documentation of this file.
1
4
#ifndef STASIS_STR_H
5
#define STASIS_STR_H
6
7
#include <stdio.h>
8
#include <stdlib.h>
9
#include <string.h>
10
#include <stdarg.h>
11
#include <ctype.h>
12
#include "
core.h
"
13
#include "log.h"
14
#include "
relocation.h
"
15
16
#define STASIS_SORT_ALPHA 1 << 0
17
#define STASIS_SORT_NUMERIC 1 << 1
18
#define STASIS_SORT_LEN_ASCENDING 1 << 2
19
#define STASIS_SORT_LEN_DESCENDING 1 << 3
20
21
22
char
*strdup_maybe_entry(
const
char
* restrict s,
struct
ExecPoint
ep,
int
exit_code);
23
#define strdup_maybe(S) strdup_maybe_entry((S), EXECPOINT, 1)
24
31
int
num_chars
(
const
char
*sptr,
int
ch);
32
40
int
startswith
(
const
char
*sptr,
const
char
*pattern);
41
49
int
endswith
(
const
char
*sptr,
const
char
*pattern);
50
57
void
strchrdel
(
char
*sptr,
const
char
*chars);
58
68
char
**
split
(
char
*sptr,
const
char
* delim,
size_t
max);
69
95
char
*
join
(
char
**arr,
const
char
*separator);
96
103
char
*
join_ex
(
char
*separator, ...);
104
118
char
*
substring_between
(
char
*sptr,
const
char
*delims);
119
129
void
strsort
(
char
**arr,
unsigned
int
sort_mode);
130
137
int
isrelational
(
char
ch);
138
144
void
print_banner
(
const
char
*s,
int
len);
145
152
char
*
strstr_array
(
char
**arr,
const
char
*str);
153
159
char
**
strdeldup
(
char
**arr);
160
173
char
*
lstrip
(
char
*sptr);
174
189
char
*
strip
(
char
*sptr);
190
208
int
isempty
(
char
*sptr);
209
215
int
isquoted
(
char
*sptr);
216
222
char
*
normalize_space
(
char
*s);
223
250
char
**
strdup_array
(
char
**array);
251
277
int
strcmp_array
(
const
char
**a,
const
char
**b);
278
284
int
isdigit_s
(
const
char
*s);
285
298
char
*
tolower_s
(
char
*s);
299
323
char
*
to_short_version
(
const
char
*s);
324
325
void
unindent(
char
*s);
326
327
int
safe_strncpy(
char
*dst,
const
char
*src,
size_t
dsize);
328
int
safe_strncat(
char
*dst,
const
char
*src,
size_t
dsize);
329
330
#endif
//STASIS_STR_H
core.h
relocation.h
strsort
void strsort(char **arr, unsigned int sort_mode)
Definition
str.c:354
strcmp_array
int strcmp_array(const char **a, const char **b)
Definition
str.c:630
tolower_s
char * tolower_s(char *s)
Definition
str.c:674
to_short_version
char * to_short_version(const char *s)
Definition
str.c:681
join_ex
char * join_ex(char *separator,...)
Definition
str.c:187
substring_between
char * substring_between(char *sptr, const char *delims)
Definition
str.c:252
endswith
int endswith(const char *sptr, const char *pattern)
Definition
str.c:45
lstrip
char * lstrip(char *sptr)
Definition
str.c:441
strchrdel
void strchrdel(char *sptr, const char *chars)
Definition
str.c:74
strdeldup
char ** strdeldup(char **arr)
Definition
str.c:399
isquoted
int isquoted(char *sptr)
Definition
str.c:500
isempty
int isempty(char *sptr)
Definition
str.c:484
strdup_array
char ** strdup_array(char **array)
Definition
str.c:601
num_chars
int num_chars(const char *sptr, int ch)
Definition
str.c:23
strstr_array
char * strstr_array(char **arr, const char *str)
Definition
str.c:385
isdigit_s
int isdigit_s(const char *s)
Definition
str.c:662
join
char * join(char **arr, const char *separator)
Definition
str.c:158
strip
char * strip(char *sptr)
Definition
str.c:460
split
char ** split(char *sptr, const char *delim, size_t max)
Definition
str.c:86
startswith
int startswith(const char *sptr, const char *pattern)
Definition
str.c:33
isrelational
int isrelational(char ch)
Definition
str.c:518
normalize_space
char * normalize_space(char *s)
Definition
str.c:548
print_banner
void print_banner(const char *s, int len)
Definition
str.c:530
ExecPoint
Definition
log.h:13
Generated by
1.17.0