String.hpp 964 B

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