diff options
author | Rémi Verschelde <rverschelde@gmail.com> | 2022-07-31 18:46:53 +0200 |
---|---|---|
committer | Rémi Verschelde <rverschelde@gmail.com> | 2022-08-01 00:40:35 +0200 |
commit | 1418f97c70a5551bdbfeea853cbc479b32ea9e08 (patch) | |
tree | 6e1da09c80d7a739b4b9f5ace23b99aca5055cb7 /core/core_bind.h | |
parent | 14828c331c6ce44a90160fbe9892346c4970116d (diff) | |
download | redot-engine-1418f97c70a5551bdbfeea853cbc479b32ea9e08.tar.gz |
File: Re-add support to skip CR (`\r`) in `File::get_as_text`
This was removed in #63481, and we confirmed that it's better like this,
but we add back the possibility to strip CR as an option, to optionally
restore the previous behavior.
For performance this is done directly in `String::parse_utf8`.
Also fixes Android `FileAccess::get_line()` as this one _should_ strip CR.
Supersedes #63717.
Diffstat (limited to 'core/core_bind.h')
-rw-r--r-- | core/core_bind.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/core/core_bind.h b/core/core_bind.h index 3a4faa3422..7564bdc7e3 100644 --- a/core/core_bind.h +++ b/core/core_bind.h @@ -411,7 +411,7 @@ public: Vector<uint8_t> get_buffer(int64_t p_length) const; // Get an array of bytes. String get_line() const; Vector<String> get_csv_line(const String &p_delim = ",") const; - String get_as_text() const; + String get_as_text(bool p_skip_cr = false) const; String get_md5(const String &p_path) const; String get_sha256(const String &p_path) const; |