stringtools.h
/*
Copyright (C) 2003-2004 Douglas Thain and the University of Wisconsin
Copyright (C) 2022 The University of Notre Dame
This software is distributed under the GNU General Public License.
See the file COPYING for details.
*/
#ifndef STRINGTOOLS_H
#define STRINGTOOLS_H
#include <stdint.h>
#include <stdlib.h>
#include <time.h>
#include <stdarg.h>
typedef char *(*string_subst_lookup_t) (const char *name, void *arg);
int string_compare(const void *p1, const void *p2);
char *string_escape_shell (const char *str);
char *string_quote_shell (const char *str);
char *string_escape_condor( const char *str);
int string_escape_chars( const char *s, char *t, const char *specials, int length );
void string_chomp(char *str);
int whole_string_match_regex(const char *text, const char *pattern);
int string_match_regex(const char *text, const char *pattern);
int string_match(const char *pattern, const char *text);
char *string_front(const char *str, int max);
const char *string_back(const char *str, int max);
char *string_metric(double value, int power_needed, char *buffer);
int64_t string_metric_parse(const char *str);
time_t string_time_parse(const char *str);
int string_split(char *str, int *argc, char ***argv);
int string_split_quotes(char *str, int *argc, char ***argv);
char *string_pad_right(char *str, unsigned int length);
char *string_pad_left(char *str, int length);
void string_cookie(char *str, int length);
char *string_subst(char *value, string_subst_lookup_t lookup, void *arg);
int string_prefix_is(const char *string, const char *prefix);
int string_suffix_is(const char *string, const char *suffix);
char *string_combine(char *first, const char *second);
char *string_combine_multi(char *first, ...);
char *string_signal(int sig);
void string_tolower(char *str);
void string_toupper(char *str);
int string_isspace(const char *str);
int string_is_integer(const char *str, long long *integer_value );
int string_is_float(const char *str, double *double_value );
void string_replace_backslash_codes(const char *instr, char *outstr);
char *string_replace_percents( const char *str, const char *replace );
int string_equal(const char *str1, const char *str2);
int strpos(const char *str, char c);
int strrpos(const char *str, char c);
int getDateString(char *str);
int string_null_or_empty(const char *str);
char *string_format (const char *fmt, ...)
__attribute__ (( format(printf,1,2) ));
int string_nformat(char *str, const size_t max, const char *fmt, ...);
char *string_trim(char *s, int(func)(int));
char *string_trim_spaces(char *s);
char *string_trim_quotes(char *s);
int string_istrue(const char *str);
char * string_wrap_command( const char *command, const char *wrapper_command );
#ifndef CCTOOLS_OPSYS_LINUX
char *strsep(char **stringp, const char *delim);
#endif
char *strnchr (const char *s, int c);
#endif
buffer
Definition buffer.h:26