godot-cpp/include/godot_cpp/core/String.hpp

64 lines
891 B
C++
Raw Normal View History

2017-03-02 22:51:31 +00:00
#ifndef STRING_H
#define STRING_H
#include <godot/godot_string.h>
namespace godot {
2017-03-02 22:51:31 +00:00
class String
{
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;
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);
2017-03-15 17:13:22 +00:00
const wchar_t *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