Skip to content

How to make sequence, string and map to bounded? #3920

Discussion options

You must be logged in to vote

I believe in the IDL you can bound things with angled brackets, for instance:

struct Foo {
    string<12> myString;
    sequence <short, 10> listOfNumbers;
};

should produce a Foo type with a property called myString which can be a maximum of 12 characters in length, and a list/array of 16-bit integers which can contain a maximum of 10 elements.

Replies: 1 comment

Comment options

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