mirror of
https://github.com/fergalmoran/ladybird.git
synced 2025-12-31 13:48:25 +00:00
Everywhere: Move the Ladybird folder to UI
This commit is contained in:
committed by
Andreas Kling
parent
93712b24bf
commit
db47cc41f8
16
UI/Android/src/main/cpp/JNIHelpers.cpp
Normal file
16
UI/Android/src/main/cpp/JNIHelpers.cpp
Normal 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());
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user