c-struct
c-struct copied to clipboard
Get accurately defined size of datatype string
Is it possible to get the defined string size from a sructure
Struct definition:
var playerSchema = new _.Schema({
name: _.type.string(16)
});
Struct use:
var buf = _.packSync('Player', {
name: 'Foobar'
});
In this case i want get the defined string length of name (16) an not the length of "Foobar".
Thanks for helping Stephan