Skip to content

Documentation mismatch for napi_get_value_string_* functions #14398

Closed
@RReverser

Description

@RReverser

napi_get_value_string_* say e.g.:

[out] result: Number of bytes copied into the buffer including the null. terminator.

However, the actual implementation in Node returns the number of bytes excluding the null terminator (so for an empty string, it will return 0 and not 1).

Not sure if it's implementation or documentation issue, or I was just confused by the wording. cc @nodejs/n-api

Metadata

Metadata

Assignees

No one assigned

    Labels

    addonsIssues and PRs related to native addons.docIssues and PRs related to the documentations.node-apiIssues and PRs related to the Node-API.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions