mirror of
https://github.com/RGBCube/serenity
synced 2025-05-31 13:28:11 +00:00
Unicode: s/codepoint/code_point/g
Unicode calls them "code points" so let's follow their style.
This commit is contained in:
parent
b139fb9f38
commit
ea9ac3155d
45 changed files with 449 additions and 449 deletions
|
@ -272,10 +272,10 @@ JS_DEFINE_NATIVE_FUNCTION(WindowObject::btoa)
|
|||
|
||||
Vector<u8> byte_string;
|
||||
byte_string.ensure_capacity(string.length());
|
||||
for (u32 codepoint : Utf8View(string)) {
|
||||
if (codepoint > 0xff)
|
||||
for (u32 code_points : Utf8View(string)) {
|
||||
if (code_points > 0xff)
|
||||
return interpreter.throw_exception<JS::InvalidCharacterError>(JS::ErrorType::NotAByteString, "btoa");
|
||||
byte_string.append(codepoint);
|
||||
byte_string.append(code_points);
|
||||
}
|
||||
|
||||
auto encoded = encode_base64(byte_string.span());
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue