Everywhere: Move the Ladybird folder to UI

This commit is contained in:
Timothy Flynn
2024-11-09 12:50:33 -05:00
committed by Andreas Kling
parent 93712b24bf
commit db47cc41f8
203 changed files with 266 additions and 244 deletions

View File

@@ -0,0 +1,16 @@
/*
* Copyright (c) 2023, Andrew Kaster <akaster@serenityos.org>
*
* SPDX-License-Identifier: BSD-2-Clause
*/
#include "JNIHelpers.h"
#include <AK/Utf16View.h>
namespace Ladybird {
jstring JavaEnvironment::jstring_from_ak_string(String const& str)
{
auto as_utf16 = MUST(AK::utf8_to_utf16(str.code_points()));
return m_env->NewString(as_utf16.data(), as_utf16.size());
}
}