Declaration of the DynamicString structure and supporting functions to work with dynamic strings. More...
#include <stdbool.h>
Go to the source code of this file.
Classes | |
struct | DynamicString |
Represents a string that can be grown dynamically. More... | |
Macros | |
#define | __DYNAMICSTRING_H__ |
Typedefs | |
typedef struct DynamicString | DynamicString |
Represents a string that can be grown dynamically. | |
Functions | |
void | DynamicString_Initialize (DynamicString *string) |
Initialize a DynamicString object to an empty string. | |
void | DynamicString_Clear (DynamicString *string) |
Clear a DynamicString object, releasing any allocated memory. Resets to an empty string. | |
bool | DynamicString_Append (DynamicString *string, const char *s) |
Append the specified string to the DynamicString object. | |
bool | DynamicString_Set (DynamicString *string, const char *s) |
Set the DynamicString object to the specified string, replacing whatever is in the DynamicString object. | |
Declaration of the DynamicString structure and supporting functions to work with dynamic strings.
Definition in file dynamicstring.h.
#define __DYNAMICSTRING_H__ |
Definition at line 8 of file dynamicstring.h.
typedef struct DynamicString DynamicString |
Represents a string that can be grown dynamically.
bool DynamicString_Append | ( | DynamicString * | string, |
const char * | s | ||
) |
Append the specified string to the DynamicString object.
Note: DynamicString_Initialize() must be called first.
string | The DynamicString object to append to. |
s | The string to append. |
Definition at line 39 of file dynamicstring.c.
References DynamicString::string.
Referenced by _ListToString(), _StringizeStringList(), Composite_Exercise_FormatEntry(), DynamicString_Set(), HandlerChain_ToString(), Interpreter_Interpret(), Message_ToString(), MessagePosition_ToString(), MessageWindow_ToString(), and WindowRectangle_ToString().
void DynamicString_Clear | ( | DynamicString * | string | ) |
Clear a DynamicString object, releasing any allocated memory. Resets to an empty string.
Note: DynamicString_Initialize() must be called first.
string | The DynamicString object to clear. |
Definition at line 27 of file dynamicstring.c.
References DynamicString_Initialize(), and DynamicString::string.
Referenced by _Mediator_Example_AddUserToGroup(), _Mediator_Example_RemoveUser(), _Mediator_Example_RemoveUserFromAllGroups(), _Mediator_Example_RemoveUserFromGroup(), _Mediator_Example_ShowAllGroups(), _Mediator_Example_ShowAllGroupsContainingUser(), _Mediator_Example_ShowAllUsers(), _Mediator_Example_ShowUsersInGroup(), _ShowHandlerChain(), Composite_Exercise_ShowEntry(), Decorator_Exercise(), DynamicString_Set(), HandlerChain_ToString(), Interpreter_Exercise(), Message_ToString(), MessageWindow_ToString(), Proxy_Exercise(), Shop_PickupOrder(), Shop_PlaceOrder(), and State_Exercise().
void DynamicString_Initialize | ( | DynamicString * | string | ) |
Initialize a DynamicString object to an empty string.
Note: This must be the first call made to initialize a DynamicString object.
string | The DynamicString object to initialize. |
Definition at line 15 of file dynamicstring.c.
Referenced by Decorator_Exercise(), DynamicString_Clear(), Message_ToString(), Proxy_Exercise(), and Shop_PlaceOrder().
bool DynamicString_Set | ( | DynamicString * | string, |
const char * | s | ||
) |
Set the DynamicString object to the specified string, replacing whatever is in the DynamicString object.
Note: DynamicString_Initialize() must be called first.
string | The DynamicString object to set. |
s | The string to set to. |
Definition at line 73 of file dynamicstring.c.
References DynamicString_Append(), and DynamicString_Clear().
Referenced by _Decorate(), _Real_DoWork(), Decorator_Exercise(), Proxy_Exercise(), and State_RemoveComments().