/*
 * FreeAdhocUDF - copyright (c) 2004 - 2006 adhoc dataservice GmbH
 * Christoph Theuring / Peter Mandrella / Georg Horn
 * based on FreeUDFLibC - copyright (c) 1999 Gregory Deatz
 * altered 2001 by ADITO Software GmbH Robert Loipfinger
 *
 * File Name:	string_functions.h
 * Description: This header contains the prototype definitions
 *
 * Software distributed under the License is distributed on an
 * "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, either express
 * or implied. See the License for the specific language governing
 * rights and limitations under the License.
 *
 *  rl = added by Robert Loipfinger
 *  pm = added by Peter Mandrella
 *  gh = added by Georg Horn
 *  ct = added by Christoph Theuring
 *
 *  String routines declarations:
 *
 *       character - return the character based on the passed integer code.
 *  pm   collatebr - replaces european special characters by similar ASCII characters
 *       crlf - return the carriage-return-linefeed string
 *  ct   lf - reutrn the linefeed string
 *  pm   digits - returns sequence of all digit characters in string
 *  pm   dollarval - format double as string with two decimals and dollar sign
 *       encryptmd5 - hash the passed string using the md5 algorithm
 *  pm   equalstring - compares two strings
 *  pm   euroval - format double as string with two decimals and euro sign
 *  pm   findword - next (partial) word starting at index position
 *       left - return the leftmost <n> characters of a string
 *       linewrap - based on lines <n> characters long, return the ith line
 *       ltrim - trim whitespace from the left side of the string
 *       lrtrim - trim whitespace from both sides of the string
 *       mid - return a substring of a string, starting at index 0
 *  pm   mid1 - return a substring of a string, starting at index 1
 *       padleft - pad the left side of a string with some other string
 *       padright - pad the right side of a string with some other string
 *       propercase - proper case the passed string (every word capitalized)
 *       replace - replace character <a> with character <b> in the string
 *  pm   replacestring - replace substring(s) with case option
 *       right - return the rightmost <n> characters of a string
 *       rtrim - Trim the right side of a string of whitespace
 *  pm   space - return a sequence of space characters
 *       stringlength - How long is this string?
 *       stripstring - Strip a string of unwanted characters
 *  rl   stripstringhold - strips a string, hold the characters given
 *  pm   strofchar - returns a sequence of characters
 *       substr - Find a substring within a string
 *  gh   strsub - same as substr only swapped parameters
 *       soundex - return the soundex of a string
 *  rl   gsoundex - return the soundex of a string (german)
 *  rl   lower - return the lowercase of a string
 *  rl   upper - return the uppercase of a string
 *  rl   telefonnr - returns the telephone number in a string
 *  rl   aif - if a, <>=, b, then, else
 *  rl   strcopy - returns <n> characters of the string, starting at <index>
 *  rl   strrm - deletes a character in a string
 *  pm   version - return library vendor and date
 *  gh   stringlistitem - search in a stringlist
 *  ct   lf - return the linefeed string
 *  ct   tab - return the TAB string
 *  ct   nbsp - return the non-breaking-space string
 *  ct   dqm - return the double-quote-mark string
 *  ct   sqm - return the single-quote-mark string
 *  ct   padcenter - pad the left and right side of a string with some other string
 */


char * character (int *);
char * crlf ();
char * lf ();
char * tab ();
char * nbsp ();
char * dqm ();
char * sqm ();
char * digits (char *);
char * encryptmd5 (char *);
char * left (char *, int *);
char * linewrap (char *, int *, int *);
char * ltrim (char *);
char * lrtrim (char *);
char * mid (char *, int *, int *);
char * padleft (char *, char *, int *);
char * padright (char *, char *, int *);
char * padcenter (char *, char *, int *);
char * propercase (char *);
char * replace (char *, char *, char *);
char * right (char *, int *);
char * rtrim (char *);
char * soundex (char *);
char * gsoundex (char *);
int * stringlength (char *);
char * stripstring (char *, char *);
char * stripstringhold (char *, char *);
int * substr (char *, char *);
int * substrnull (char *, char *);
int * strsub (char *, char *);
int * strsubnull (char *, char *);
char * lower (char *);
char * upper (char *);
char * telefonnr (char *, int *);
char * aif (char *, char *, char *, char *, char *);
char * strcopy (char *, int *, int *);
char * strrm (char *, int *);
char * version ();
char * predecessor (char *, int *);
char * successor (char *, int *);
char * reverse (char *);
int * wordcount (char *);
short * ord(unsigned char *);
int * stringcount(char *, char *);

// internal functions
int find_char (char, char *);

char * collatebr (char *);
int * equalstring (char *, char *);
char * findnthword (char *, int *);
char * findword (char *, int *);
int * findwordindex (char *, int *);
int * findwordindexnull (char *, int *);
char * mid1 (char *, int *, int *);
char * replacestring (char *, char *, char *, int *, int *);
char * intern_replacestring (char *, char *, char *, int *, int *, int);
char * space (int *);
char * strofchar (char *, int *);
char * dollarval (double *);
char * euroval (double *);
char * stringlistitem (char *, char *);
char * excelstring (char *);
char * intern_excelstring (char *, int);
