GophHub - kevinboone/epub2txt2/src/custom_string.h


Raw File

    1	/*============================================================================
    2	  epub2txt v2 
    3	  string.c
    4	  Copyright (c)2020 Kevin Boone, GPL v3.0
    5	============================================================================*/
    6	
    7	#pragma once
    8	
    9	#include <stdint.h>
   10	#include "defs.h"
   11	
   12	struct _String;
   13	typedef struct _String String;
   14	
   15	String      *string_create_empty (void);
   16	String      *string_create (const char *s);
   17	String      *string_clone (const String *self);
   18	int          string_find (const String *self, const char *search);
   19	void         string_destroy (String *self);
   20	const char  *string_cstr (const String *self);
   21	const char  *string_cstr_safe (const String *self);
   22	void         string_append_printf (String *self, const char *fmt,...);
   23	void         string_append (String *self, const char *s);
   24	void         string_append_c (String *self, const uint32_t c);
   25	void         string_prepend (String *self, const char *s);
   26	int          string_length (const String *self);
   27	String      *string_substitute_all (const String *self, 
   28	                const char *search, const char *replace);
   29	void        string_delete (String *self, const int pos, 
   30	                const int len);
   31	void        string_insert (String *self, const int pos, 
   32	                const char *replace);
   33	BOOL        string_create_from_utf8_file (const char *filename, 
   34	                String **result, char **error);
   35	String     *string_encode_url (const char *s);
   36	void        string_append_byte (String *self, const BYTE byte);
   37	
   38	

Generated by GNU Enscript 1.6.6, and GophHub 1.3.