2015-03-13 18:52:59 +00:00
|
|
|
/* Copyright (c) 2008-2015, Avian Contributors
|
2010-09-20 23:31:23 +00:00
|
|
|
|
|
|
|
Permission to use, copy, modify, and/or distribute this software
|
|
|
|
for any purpose with or without fee is hereby granted, provided
|
|
|
|
that the above copyright notice and this permission notice appear
|
|
|
|
in all copies.
|
|
|
|
|
|
|
|
There is NO WARRANTY for this software. See license.txt for
|
|
|
|
details. */
|
|
|
|
|
2013-02-21 23:18:20 +00:00
|
|
|
#ifndef AVIAN_UTIL_STRING_H
|
|
|
|
#define AVIAN_UTIL_STRING_H
|
|
|
|
|
|
|
|
#include <string.h>
|
|
|
|
|
|
|
|
namespace avian {
|
|
|
|
namespace util {
|
|
|
|
|
|
|
|
class String {
|
2014-07-11 15:50:18 +00:00
|
|
|
public:
|
2013-02-21 23:18:20 +00:00
|
|
|
const char* text;
|
|
|
|
size_t length;
|
|
|
|
|
2014-07-11 15:50:18 +00:00
|
|
|
String(const char* text) : text(text), length(strlen(text))
|
|
|
|
{
|
|
|
|
}
|
|
|
|
|
|
|
|
inline String(const char* text, size_t length) : text(text), length(length)
|
|
|
|
{
|
|
|
|
}
|
2013-02-21 23:18:20 +00:00
|
|
|
};
|
2010-09-20 23:31:23 +00:00
|
|
|
|
2014-07-11 15:50:18 +00:00
|
|
|
} // namespace util
|
|
|
|
} // namespace avain
|
2010-09-20 23:31:23 +00:00
|
|
|
|
2014-07-11 15:50:18 +00:00
|
|
|
#endif // AVIAN_UTIL_STRING_H
|