From 7f2ef1406ba64feb1f789d2c2037aef58a93bf64 Mon Sep 17 00:00:00 2001 From: Stefano Ceccherini Date: Sat, 28 Sep 2002 04:26:45 +0000 Subject: [PATCH] First BString use cases git-svn-id: file:///srv/svn/repos/haiku/trunk/current@1230 a95241bf-73f2-0310-859d-f6bbb57e9c96 --- .../support/usecases/BStringUseCases.html | 61 +++++++++++++++++++ 1 file changed, 61 insertions(+) create mode 100644 docs/develop/support/usecases/BStringUseCases.html diff --git a/docs/develop/support/usecases/BStringUseCases.html b/docs/develop/support/usecases/BStringUseCases.html new file mode 100644 index 0000000000..03290ca6d7 --- /dev/null +++ b/docs/develop/support/usecases/BStringUseCases.html @@ -0,0 +1,61 @@ + + + +BString Use Cases and Implementation Details + + + + + + +

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. +
  3. BString Use Cases
  4. +
  5. BString Implementation
  6. +
+ +

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. + +
  3. 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.

  4. + +
  5. 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.

  6. + +
  7. 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.

  8. + +
  9. Destruction: The BString destructor frees the allocated memory.

  10. + +
+ +

BString Implementation:

+ + + + \ No newline at end of file