3.3.10. scriba_NewSbBytes()

[<<<] [>>>]

This function allocates and returns a pointer pointing to a structure of type SbData holding a string value. If the allocation failed the return value is NULL. If the memory allocation was successful the allocated structure will have the type SBT_STRING and will hold the initial value specified by the argument pszInitValue of the length len.

pSbData scriba_NewSbBytes(pSbProgram pProgram,
                          unsigned long len,
                          unsigned char *pszInitValue
This function allocates len+1 number of bytes data and stores the initial value pointed by pszInitValue in it.

The extra plus one byte is an extra terminating zero char that may help the C programmers to handle the string in case it is not binary. Please also read the not on the terminating ZChar in the function @xref{scriba_NewSbString()}.

See also @xref{scriba_NewSbLong()}, @xref{scriba_NewSbDouble()}, @xref{scriba_NewSbUndef()}, @xref{scriba_NewSbString()}, @xref{scriba_NewSbBytes()}, @xref{scriba_DestroySbData()}.

[<<<] [>>>]