String.hpp 834 B

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162
  1. #ifndef STRING_H
  2. #define STRING_H
  3. #include <godot/godot_string.h>
  4. namespace godot {
  5. class String
  6. {
  7. godot_string _godot_string;
  8. public:
  9. String();
  10. String(const char *contents);
  11. String(const wchar_t *contents);
  12. String(const wchar_t c);
  13. String(const String& other);
  14. ~String();
  15. String substr(int p_from,int p_chars) const;
  16. wchar_t &operator [](const int idx);
  17. wchar_t operator [](const int idx) const;
  18. int length() const;
  19. bool operator ==(const String &s);
  20. bool operator !=(const String &s);
  21. String operator +(const String &s);
  22. void operator +=(const String &s);
  23. void operator +=(const wchar_t c);
  24. bool operator <(const String &s);
  25. bool operator <=(const String &s);
  26. bool operator >(const String &s);
  27. bool operator >=(const String &s);
  28. const wchar_t *c_string();
  29. };
  30. }
  31. #endif // STRING_H