beastapi/beaststring.h File Reference

#include "beastapitypes.h"

File Description

Beast strings is objects encapsulating strings returned from Beast API functions.

Functions

ILBStatus ILBCopy (ILBStringHandle string, ILBString target, int32 length)
 
ILBStatus ILBGetLength (ILBStringHandle string, int32 *length)
 
ILBStatus ILBReleaseString (ILBStringHandle string)
 

Function Documentation

ILBStatus ILBCopy ( ILBStringHandle  string,
ILBString  target,
int32  length 
)

Copies the contained string to a buffer.

The length is defined in the same way as in ILBGetLength

Parameters
stringthe string to copy from
targeta buffer to copy the string to.
lengththe size of the buffer. Specified as the number of characters (that may be different for different encodings) as opposed to number of bytes.
Returns
The result of the operation.
+ Examples:
ILBStatus ILBGetLength ( ILBStringHandle  string,
int32 *  length 
)

Returns the length of the string in number of characters.


The size of each character is specified by the currently used string encoding. I.E if you get 5 as length and use utf 16 your string should be 10 bytes large. Note the length includes the terminating 0. This method shall never return 0, an empty string is returned as a single termination character

Parameters
stringthe string to query length from
lengtha pointer to an integer receiving the length
Returns
The result of the operation.
+ Examples:
ILBStatus ILBReleaseString ( ILBStringHandle  string)

Releases a string object.


Note that strings are not managed through the Beast Manager so it must be released manually or it will be a memory leak.

Parameters
stringthe string to release.
Returns
The result of the operation.
+ Examples:

Go to the source code of this file.