Skip to content

Add method for reading C-style strings from WasmPtr #1086

Closed
@MarkMcCaskey

Description

@MarkMcCaskey

Suggested on spectrum .

This is a very good idea, we should support getting a slice from a null-terminated array and probably have a function that just returns a &str too. Edge cases to watch out for are null bytes in UTF-8 may be valid if in code point. If that is the case, then we'll want to have a helper method specifically for reading UTF-8 from a WasmPtr with a null terminator. ASCII can probably go through CStr

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions