1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-27 14:57:35 +00:00

Ladybird/AppKit: Implement the <input type=file> UI

This commit is contained in:
Timothy Flynn 2024-02-25 14:12:21 -05:00 committed by Andreas Kling
parent 834f76ef24
commit a346f14fb4
3 changed files with 45 additions and 0 deletions

View file

@ -14,6 +14,12 @@ String ns_string_to_string(NSString* string)
return MUST(String::from_utf8({ utf8, strlen(utf8) }));
}
ByteString ns_string_to_byte_string(NSString* string)
{
auto const* utf8 = [string UTF8String];
return ByteString(utf8, strlen(utf8));
}
NSString* string_to_ns_string(StringView string)
{
return [[NSString alloc] initWithData:string_to_ns_data(string) encoding:NSUTF8StringEncoding];