When I parse a string from a fixed length SBE field, is the string terminated with a single 0, or how otherwise do I determine where to truncate? Conversely, when I populate such a field, should I ensure that the remainder of my array after the string is zeroed out or otherwise?
The string with either be null-terminated or will be of the size of the fixed length field. So if the string is smaller than the field length; it will end with a \0. If the string is the same length as the field length then there is no terminator.
When writing you do not have to ensure the remainder of the array is all \0 values - although that would work. The string just needs to be terminated with a single \0; or if the string is exactly as large as the field length - you don't need to do anything.
The server expects string fields to be terminated with a \0.
Overview
Content Tools