mirror of
https://github.com/godotengine/godot.git
synced 2026-01-05 06:11:29 +03:00
Core: Remove skip_cr argument from String
This commit is contained in:
@@ -1763,7 +1763,7 @@ Error String::append_ascii(const Span<char> &p_range) {
|
||||
return decode_failed ? ERR_INVALID_DATA : OK;
|
||||
}
|
||||
|
||||
Error String::append_utf8(const char *p_utf8, int p_len, bool p_skip_cr) {
|
||||
Error String::append_utf8(const char *p_utf8, int p_len) {
|
||||
if (!p_utf8) {
|
||||
return ERR_INVALID_DATA;
|
||||
}
|
||||
@@ -1796,11 +1796,6 @@ Error String::append_utf8(const char *p_utf8, int p_len, bool p_skip_cr) {
|
||||
|
||||
while (ptrtmp < ptr_limit && *ptrtmp) {
|
||||
uint8_t c = *ptrtmp;
|
||||
|
||||
if (p_skip_cr && c == '\r') {
|
||||
++ptrtmp;
|
||||
continue;
|
||||
}
|
||||
uint32_t unicode = _replacement_char;
|
||||
uint32_t size = 1;
|
||||
|
||||
|
||||
@@ -525,9 +525,9 @@ public:
|
||||
}
|
||||
|
||||
CharString utf8(Vector<uint8_t> *r_ch_length_map = nullptr) const;
|
||||
Error append_utf8(const char *p_utf8, int p_len = -1, bool p_skip_cr = false);
|
||||
Error append_utf8(const Span<char> &p_range, bool p_skip_cr = false) {
|
||||
return append_utf8(p_range.ptr(), p_range.size(), p_skip_cr);
|
||||
Error append_utf8(const char *p_utf8, int p_len = -1);
|
||||
Error append_utf8(const Span<char> &p_range) {
|
||||
return append_utf8(p_range.ptr(), p_range.size());
|
||||
}
|
||||
static String utf8(const char *p_utf8, int p_len = -1) {
|
||||
String ret;
|
||||
|
||||
Reference in New Issue
Block a user