diff options
author | Klaus Schmidinger <vdr@tvdr.de> | 2010-10-24 13:08:55 +0200 |
---|---|---|
committer | Klaus Schmidinger <vdr@tvdr.de> | 2010-10-24 13:08:55 +0200 |
commit | 1c5ece6100d7dcb1015187a7e3ae73b41d509b16 (patch) | |
tree | 311941102526e2ab645bd38ad77918c27d4e1588 /tools.c | |
parent | fbbcb8e9c88901b4a583fb688718b3dc6a5ceea2 (diff) | |
download | vdr-1c5ece6100d7dcb1015187a7e3ae73b41d509b16.tar.gz vdr-1c5ece6100d7dcb1015187a7e3ae73b41d509b16.tar.bz2 |
Added cString::operator=(const char *String)
Diffstat (limited to 'tools.c')
-rw-r--r-- | tools.c | 9 |
1 files changed, 8 insertions, 1 deletions
@@ -4,7 +4,7 @@ * See the main source file 'vdr.c' for copyright information and * how to reach the author. * - * $Id: tools.c 2.9 2010/10/24 11:32:27 kls Exp $ + * $Id: tools.c 2.10 2010/10/24 13:07:30 kls Exp $ */ #include "tools.h" @@ -885,6 +885,13 @@ cString &cString::operator=(const cString &String) return *this; } +cString &cString::operator=(const char *String) +{ + free(s); + s = String ? strdup(String) : NULL; + return *this; +} + cString &cString::Truncate(int Index) { int l = strlen(s); |