COMMON: Replace rindex() with more portable code

This commit is contained in:
Eugene Sandulenko 2021-08-01 14:50:42 +02:00
parent 09dfabf6c5
commit 11e486d631
No known key found for this signature in database
GPG Key ID: 014D387312D34F08

View File

@ -304,7 +304,7 @@ String punycode_encodefilename(const String src) {
dst += '\x81';
dst += '\x79';
// Encode special symbols and non-printables
} else if (rindex("/\":*[]+|\\?%<>,;=", (byte)src[i]) || (byte)src[i] < 0x20) {
} else if (Common::String("/\":*[]+|\\?%<>,;=").contains(src[i]) || (byte)src[i] < 0x20) {
dst += '\x81';
dst += (byte)src[i] + '\x80';
} else {