Skip to content

Pattern for string with size? #1937

Discussion options

You must be logged in to vote

Hello, yes there is a better way. Check out the standard library type: std::string::SizedString from the type.magic library. In this case you'd use it like this:

import type.magic;

std::string::SizedString<u8> string @ 0x0a;

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by danielniccoli
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
2 participants