Skip to main content

ddwaf_object_set_string

Function ddwaf_object_set_string 

Source
pub unsafe extern "C" fn ddwaf_object_set_string(
    object: *mut ddwaf_object,
    string: *const c_char,
    length: u32,
    alloc: ddwaf_allocator,
) -> *mut ddwaf_object
Expand description

Creates an object from a string.

@param object Object to perform the operation on. (nonnull) @param string String to initialise the object with, this string will be copied. (nonnull) @param length Length of the string. @param alloc Allocator to use for memory allocation. (nonnull)

@return A pointer to the passed object or NULL if the operation failed.