More doxygen generation.
[gedcom-parse.git] / utf8 / utf8tools.h
index 3cfb1c13be35ba51a41679bdabc86b78c878eae4..d2e4e981126d8e50577cf95f98ce2457e2f000dc 100644 (file)
@@ -1,16 +1,27 @@
 /* Header file for UTF-8 functions
    Copyright (C) 2001, 2002 Peter Verthez
 
-   Permission granted to do anything with this file that you want, as long
-   as the above copyright is retained in all copies.
-   THERE IS NO WARRANTY - USE AT YOUR OWN RISK
+   The UTF8 tools library is free software; you can redistribute it
+   and/or modify it under the terms of the GNU Lesser General Public
+   License as published by the Free Software Foundation; either
+   version 2.1 of the License, or (at your option) any later version.
+
+   The Gedcom parser library is distributed in the hope that it will be
+   useful, but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+   Lesser General Public License for more details.
+
+   You should have received a copy of the GNU Lesser General Public
+   License along with the Gedcom parser library; if not, write to the
+   Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+   02111-1307 USA.
 */
 
 /* $Id$ */
 /* $Name$ */
 
-#ifndef __UTF8_H
-#define __UTF8_H
+#ifndef __UTF8TOOLS_H
+#define __UTF8TOOLS_H
 
 #ifdef __cplusplus
 extern "C" {
@@ -30,6 +41,12 @@ int   utf8_strlen(const char* input);
   /* Returns 1 if string is valid UTF-8 string, 0 otherwise */
 int   is_utf8_string(const char* input);
 
+  /* Returns respectively a pointer to the next or the nth UTF-8 character.
+     The value n = 0 is the first character of the input, i.e.
+     next_utf8_char(input) is the same as nth_utf8_char(input, 1) */
+char* next_utf8_char(char* input);
+char* nth_utf8_char(char* input, int n);
+
   /* Functions for creating and freeing conversion buffers yourself */
 conv_buffer_t create_conv_buffer(int size);
 void free_conv_buffer(conv_buffer_t buf);
@@ -57,4 +74,4 @@ char* convert_locale_to_utf8(const char* input);
 }
 #endif
 
-#endif /* __UTF8_H */
+#endif /* __UTF8TOOLS_H */