lrc_get_bstr_sub

Type Conversion From String

Returns a subset of a BSTR string.

BSTR lrc_get_bstr_sub( BSTR str, int size );
strA string of type BSTR.
sizeThe offset from beginning of string

lrc_get_bstr_sub returns a subset of the input string str, size characters from the beginning.

Return Values

lrc Return Values

Parameterization

You cannot use standard parameterization for any arguments in this function.

Example

In the following example lrc_get_bstr_sub returns a subset of the original string str1, 7 characters from the beginning. This includes the nulls embedded in the string.

BSTR str1= lrc_BSTR1("abc\x00def\x00\x00ghi", 12);
BSTR str2 = lrc_get_bstr_sub(str1, 7);
lrc_print_bstr(str2); /* prints 7 chars "abc\x00def" */