squareball 0.2.0.28-7bb8 A general-purpose library for C99

- Main Page
- Data Structures
- Files
- Examples

- File List
- Globals

All Data Structures Files Functions Variables Typedefs
sb-strfuncs.h
Go to the documentation of this file.
1 /*
2 * squareball: A general-purpose library for C99.
3 * Copyright (C) 2014-2018 Rafael G. Martins <rafael@rafaelmartins.eng.br>
4 *
5 * This program can be distributed under the terms of the BSD License.
6 * See the file LICENSE.
7 */
8
9 #ifndef _SQUAREBALL_STRFUNCS_H
10 #define _SQUAREBALL_STRFUNCS_H
11
12 #include <stdarg.h>
13 #include <stdbool.h>
14 #include <stdarg.h>
15
29 char* sb_strdup(const char *s);
30
38 char* sb_strndup(const char *s, size_t n);
39
48 char* sb_strdup_vprintf(const char *format, va_list ap);
49
58 char* sb_strdup_printf(const char *format, ...);
59
68 bool sb_str_starts_with(const char *str, const char *prefix);
69
78 bool sb_str_ends_with(const char *str, const char *suffix);
79
87 char* sb_str_lstrip(char *str);
88
97 char* sb_str_rstrip(char *str);
98
107 char* sb_str_strip(char *str);
108
121 char** sb_str_split(const char *str, char c, size_t max_pieces);
122
132 char* sb_str_replace(const char *str, const char search, const char *replace);
133
144 char* sb_str_find(const char *str, char c);
145
152 void sb_strv_free(char **strv);
153
162 char* sb_strv_join(char **strv, const char *separator);
163
171 size_t sb_strv_length(char **strv);
172
175 #endif /* _SQUAREBALL_STRFUNCS_H */
sb_str_find
char * sb_str_find(const char *str, char c)
sb_str_strip
char * sb_str_strip(char *str)
sb_strdup_printf
char * sb_strdup_printf(const char *format,...)
sb_str_split
char ** sb_str_split(const char *str, char c, size_t max_pieces)
sb_str_starts_with
bool sb_str_starts_with(const char *str, const char *prefix)
sb_str_ends_with
bool sb_str_ends_with(const char *str, const char *suffix)
sb_str_replace
char * sb_str_replace(const char *str, const char search, const char *replace)
sb_strdup
char * sb_strdup(const char *s)
sb_strndup
char * sb_strndup(const char *s, size_t n)
sb_strv_free
void sb_strv_free(char **strv)
sb_strdup_vprintf
char * sb_strdup_vprintf(const char *format, va_list ap)
sb_str_lstrip
char * sb_str_lstrip(char *str)
sb_strv_join
char * sb_strv_join(char **strv, const char *separator)
sb_strv_length
size_t sb_strv_length(char **strv)
sb_str_rstrip
char * sb_str_rstrip(char *str)