Programme de conversion de formules mathématiques écrites en ASCII pseudo-C vers LaTeX.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

70 lines
1.7 KiB

* public interface of libstr.
* a simplistic API to manipulate ASCII strings in C.
* this is part of the libstr library sources
* copyright © 2008 Benoît Rouits <>
* released under the terms of GNU LGPL
* (GNU Lesser General Public License).
* more information on
* licence text on
#ifndef LIBSTR_H
#define LIBSTR_H
#ifdef __cplusplus
extern "C" {
extern char* str_new (void);
/* create an empty string */
extern void str_del (char* str);
/* delete a string */
extern char* str_cat (const char* str1, const char* str2);
/* cat two strings */
char* str_catall (const char* first, ...);
/* cat n strings */
extern int str_len (const char* str);
/* give length of string */
extern int str_end (const char* str);
/* give last index of string */
extern char* str_up (const char* str);
/* capitalize string */
extern char* str_cap (const char* str);
/* capitalize first letter */
extern char* str_low (const char* str);
/* lower string */
extern char* str_sub (const char* str, int begin, int length);
/* create substring */
extern int str_find (const char* str, const char* search);
/* search substing */
extern int str_fnm (const char* str, const char* pattern);
/* looks fnmatch */
extern int str_rgm (const char* str, const char* regex);
/* looks re match */
extern char* str_tr (const char* str, const char* from, const char* to);
/* translate substring (raw/raw) */
extern char* str_sed (const char* str, const char* regex1, const char* edit);
/* tranlate substring (regex/regex) */
char** str_split (const char* str, const char* sep, char** trail);
/* split a string given a separator */
#ifdef __cplusplus