Add has_extension() method to String

This commit is contained in:
kobewi
2025-08-08 17:56:19 +02:00
parent ca452113d4
commit a33ae0be0e
29 changed files with 46 additions and 48 deletions

View File

@ -520,6 +520,8 @@ public:
String get_basename() const;
String path_join(const String &p_path) const;
char32_t unicode_at(int p_idx) const;
bool has_extension(const char *p_ext) const { return get_extension().to_lower() == p_ext; }
bool has_extension(const String &p_ext) const { return get_extension().to_lower() == p_ext; }
CharString ascii(bool p_allow_extended = false) const;
// Parse an ascii string.