godot-cpp/include/core/String.hpp

70 lines
964 B
C++
Raw Normal View History

2017-03-02 22:51:31 +00:00
#ifndef STRING_H
#define STRING_H
#include <godot/string.h>
2017-03-02 22:51:31 +00:00
namespace godot {
2017-03-02 22:51:31 +00:00
class NodePath;
class String
2017-03-02 22:51:31 +00:00
{
godot_string _godot_string;
public:
String();
String(const char *contents);
String(const wchar_t *contents);
String(const wchar_t c);
String(const String& other);
~String();
String substr(int p_from,int p_chars) const;
wchar_t &operator [](const int idx);
wchar_t operator [](const int idx) const;
int length() const;
2017-03-18 14:23:28 +00:00
void operator =(const String &s);
bool operator ==(const String &s);
bool operator !=(const String &s);
String operator +(const String &s);
void operator +=(const String &s);
void operator +=(const wchar_t c);
bool operator <(const String &s);
bool operator <=(const String &s);
bool operator >(const String &s);
bool operator >=(const String &s);
operator NodePath() const;
2017-04-11 13:48:26 +00:00
const char *c_string() const;
2017-03-02 22:51:31 +00:00
};
2017-03-15 17:13:22 +00:00
String operator +(const char *a, const String& b);
2017-03-02 22:51:31 +00:00
}
#endif // STRING_H