Skip to content

Investigate how to represent string constants #692

Open
@retep998

Description

@retep998

String constants currently aren't very useful as they do not have null terminators, and they are normal Rust UTF-8 strings. This means that users have to do runtime conversions in order to pass these strings to winapi functions, instead of just grabbing a raw pointer and tossing it in.

A solution needs to be found using a (procedural?) macro that will transform a string literal into a constant with methods to access both the UTF-8 and UTF-16 variants, both with and without a null terminator.

Metadata

Metadata

Assignees

No one assigned

    Labels

    help wantedHelp is requested to deal with this issue

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions