function::kernel_string_quoted_utf16 - Linux
Overview
function::kernel_string_quoted_utf16
converts a UTF-16 string to a quoted string (UTF-8).
Syntax
function::kernel_string_quoted_utf16(input: bytes) -> bytes
Options/Flags
None.
Examples
// Convert a UTF-16 string to a quoted string
let str = [0x00, 0x50, 0x00, 0x61, 0x00, 0x75, 0x00, 0x6c]; // "Paul" (UTF-16)
let quoted = function::kernel_string_quoted_utf16(str); // "\"Paul\"" (UTF-8)
Common Issues
Ensure that the input string is a valid UTF-16 string. Invalid inputs may result in unexpected behavior.
Integration
This function can be used with other functions that require quoted UTF-8 strings, such as function::kernel_string_find_utf8
.
Related Commands
function::kernel_string_utf16_to_utf8
: Converts a UTF-16 string to a UTF-8 string.function::kernel_string_find_utf8
: Searches for a UTF-8 string within a byte array.