Skip to main content

read_string_unchecked

Function read_string_unchecked 

Source
pub unsafe fn read_string_unchecked(
    data: &[u8],
    offset: usize,
) -> Option<(String, usize)>
Expand description

Read a Borsh length-prefixed UTF-8 string.

ยงSafety

This remains unsafe for API compatibility. The implementation validates the prefix, bounds, integer arithmetic, and UTF-8 before returning.