Fixed c_str()
This commit is contained in:
parent
5751d381af
commit
dd6c169994
|
@ -32,6 +32,8 @@
|
||||||
#ifndef _INCLUDE_CSTRING_H
|
#ifndef _INCLUDE_CSTRING_H
|
||||||
#define _INCLUDE_CSTRING_H
|
#define _INCLUDE_CSTRING_H
|
||||||
|
|
||||||
|
#include <string.h>
|
||||||
|
|
||||||
//by David "BAILOPAN" Anderson
|
//by David "BAILOPAN" Anderson
|
||||||
class String
|
class String
|
||||||
{
|
{
|
||||||
|
@ -63,9 +65,9 @@ public:
|
||||||
assign(src.c_str());
|
assign(src.c_str());
|
||||||
}
|
}
|
||||||
|
|
||||||
const char *c_str() { return v; }
|
const char *c_str() { return v?v:""; }
|
||||||
|
|
||||||
const char *c_str() const { return v; }
|
const char *c_str() const { return v?v:""; }
|
||||||
|
|
||||||
void append(const char *t)
|
void append(const char *t)
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in New Issue
Block a user