summaryrefslogtreecommitdiff
path: root/tools.h
diff options
context:
space:
mode:
authorKlaus Schmidinger <vdr@tvdr.de>2007-06-16 10:41:21 +0200
committerKlaus Schmidinger <vdr@tvdr.de>2007-06-16 10:41:21 +0200
commitb532dc82299d1a11b5bdbbbee17f614dd87e8307 (patch)
tree26e67a6b9f0ef901f7df1e2213b9deb450aea40c /tools.h
parent81e44bce198d53d0515290724c0ec8f989b9e01d (diff)
downloadvdr-b532dc82299d1a11b5bdbbbee17f614dd87e8307.tar.gz
vdr-b532dc82299d1a11b5bdbbbee17f614dd87e8307.tar.bz2
Replaced strncpy() and strn0cpy() with Utf8Strn0Cpy() where necessary
Diffstat (limited to 'tools.h')
-rw-r--r--tools.h7
1 files changed, 6 insertions, 1 deletions
diff --git a/tools.h b/tools.h
index 005c9228..6feda29f 100644
--- a/tools.h
+++ b/tools.h
@@ -4,7 +4,7 @@
* See the main source file 'vdr.c' for copyright information and
* how to reach the author.
*
- * $Id: tools.h 1.100 2007/06/16 09:05:22 kls Exp $
+ * $Id: tools.h 1.101 2007/06/16 09:15:40 kls Exp $
*/
#ifndef __TOOLS_H
@@ -96,6 +96,11 @@ int Utf8SymChars(const char *s, int Symbols);
int Utf8StrLen(const char *s);
///< Returns the number of UTF-8 symbols formed by the given string of
///< character bytes.
+char *Utf8Strn0Cpy(char *Dest, const char *Src, int n);
+ ///< Copies at most n character bytes from Src to Dst, making sure that the
+ ///< resulting copy ends with a complete UTF-8 symbol. The copy is guaranteed
+ ///< to be zero terminated.
+ ///< Returns a pointer to Dest.
int Utf8ToArray(const char *s, uint *a, int Size);
///< Converts the given character bytes (including the terminating 0) into an
///< array of UTF-8 symbols of the given Size. Returns the number of symbols