# BString Use Cases and Implementation Details:

This document describes the BString interface and some basics of how it is implemented. The document has the following sections:

1. BString Interface
2. BString Use Cases
3. BString Implementation

## BString Interface:

The BString is as string allocation and manipulation class. The object allocates and deallocates memory for you so the buffer will always be "big enough" to contain the data. BString provides a number of charachter search, comparison, and manipulation functions in a variety of flavors. The best source of information about the BString class can be found here in the Be Book.

## BString Use Cases:

The following use cases cover the BString functionality:

1. Construction 1: A BString can be created with an empty constructor. This way the created BString is empty.

2. Construction 2: You can create a BString object with a const char pointer as parameter. After the construction, the BString object contains a copy of the string pointed by the const char pointer.

3. Construction 3: BString can be created using a copy constructor. The parameter is another BString. After the construction, your BString will contain a copy of the other BString.

4. Construction 4: You can create a BString object with a const char pointer as parameter and an int32 parameter, which specifies the maximum bytes BString will consider. After the construction, the BString object contains a maximum of bytes (specified by the int32 parameter) of the string pointed by the pointer.

5. Destruction: The BString destructor frees the allocated memory.

## BString Implementation: