/* $Cambridge: hermes/src/prayer/accountd/string.h,v 1.2 2003/05/13 12:53:30 dpc22 Exp $ */ /************************************************ * Prayer - a Webmail Interface * ************************************************/ /* Copyright (c) University of Cambridge 2000 - 2002 */ /* See the file NOTICE for conditions of use and distribution. */ /* External Interfere Prototypes for string.c */ /* Some Basic utility functions */ char *string_itoa(struct pool *pool, unsigned long value); char *string_itoa_tmp(unsigned long value); BOOL string_isnumber(char *s); BOOL ishex(char value); unsigned long hex(char value); BOOL string_atom_has_special(char *s); char *string_atom_quote(struct pool *pool, char *s); BOOL string_contains_dotdot(char *s); char *string_prune(struct pool *pool, char *s, unsigned long maxlen); char *string_trim_whitespace(char *string); char *string_left(struct pool *p, char *string, unsigned long count); BOOL string_isspace(char c); BOOL string_iseol(char c); char *string_next_token(char **sp); char *string_get_token(char **sp); BOOL string_skip_token(char **sp); char *string_next_line(char **sp); char *string_get_line(char **sp); char *string_get_lws_line(char **sp, BOOL squeeze); char *string_canon_decode(char *string); char *string_canon_encode(struct pool *pool, char *arg); char *string_canon_path_encode(struct pool *pool, char *dir, char *file); char *string_url_encode(struct pool *pool, char *arg); char *string_url_decode(char *string); char *string_url_decode_component(char **tp, char sep); char *string_filename_encode(struct pool *pool, char *arg); char *string_date_to_string_long(unsigned long month, unsigned long day, unsigned long year); char *string_date_to_string_short(unsigned long month, unsigned long day); void string_malloc(void **ptr, unsigned long size); void string_strdup(char **ptr, char *string); void string_free(void **ptr); char *string_expand(struct pool *pool, struct assoc *h, char *s);