From 13c27199231cbc2cc83969ada741b95be1cca4d3 Mon Sep 17 00:00:00 2001 From: Matthias Andree Date: Wed, 10 Nov 2004 19:04:29 +0000 Subject: Import Trio 1.10 into fetchmail's trunk. svn path=/trunk/; revision=3995 --- trio/html/group___dynamic_strings.html | 362 +++++++++++++++++++++++++++++++++ 1 file changed, 362 insertions(+) create mode 100644 trio/html/group___dynamic_strings.html (limited to 'trio/html/group___dynamic_strings.html') diff --git a/trio/html/group___dynamic_strings.html b/trio/html/group___dynamic_strings.html new file mode 100644 index 00000000..ab349297 --- /dev/null +++ b/trio/html/group___dynamic_strings.html @@ -0,0 +1,362 @@ + + + + + TRIO + + + + +
+Main Page   Modules  
+

Dynamic String Functions.

Dynamic string functions. +More... + + + + + + + + + + + + + + + +

Functions

TRIO_STRING_PUBLIC trio_string_t * trio_string_create (int initial_size)
 Create a new dynamic string. More...

TRIO_STRING_PUBLIC void trio_string_destroy (trio_string_t *self)
 Deallocate the dynamic string and its contents. More...

TRIO_STRING_PUBLIC char * trio_string_get (trio_string_t *self, int offset)
 Get a pointer to the content. More...

TRIO_STRING_PUBLIC char * trio_string_extract (trio_string_t *self)
 Extract the content. More...

TRIO_STRING_PUBLIC void trio_xstring_set (trio_string_t *self, char *buffer)
 Set the content of the dynamic string. More...

TRIO_STRING_PUBLIC int trio_string_append (trio_string_t *self, trio_string_t *other)
 Append the second string to the first. More...

TRIO_STRING_PUBLIC int trio_string_contains (trio_string_t *self, trio_string_t *other)
 Search for the first occurrence of second parameter in the first. More...

+

Detailed Description

+Dynamic string functions. +

+SYNOPSIS +

+

+cc ... -ltrio -lm
+
+#include <triostr.h>
+
+

+DESCRIPTION


Function Documentation

+

+ + + + +
+ + + + + + + + + + + + + + + + + + + +
TRIO_STRING_PUBLIC int trio_string_append trio_string_t *   self,
trio_string_t *   other
+
+ + + + + +
+   + + +

+Append the second string to the first. +

+

+Parameters:
+ + + +
self  +Dynamic string to be modified.
other  +Dynamic string to copy from.
+
+Returns:
+Boolean value indicating success or failure.
+

+ + + + +
+ + + + + + + + + + + + + + + + + + + +
TRIO_STRING_PUBLIC int trio_string_contains trio_string_t *   self,
trio_string_t *   other
+
+ + + + + +
+   + + +

+Search for the first occurrence of second parameter in the first. +

+

+Parameters:
+ + + +
self  +Dynamic string to be modified.
other  +Dynamic string to copy from.
+
+Returns:
+Boolean value indicating success or failure.
+

+ + + + +
+ + + + + + + + + + +
TRIO_STRING_PUBLIC trio_string_t* trio_string_create int   initial_size
+
+ + + + + +
+   + + +

+Create a new dynamic string. +

+

+Parameters:
+ + +
initial_size  +Initial size of the buffer.
+
+Returns:
+Newly allocated dynamic string, or NULL if memory allocation failed.
+

+ + + + +
+ + + + + + + + + + +
TRIO_STRING_PUBLIC void trio_string_destroy trio_string_t *   self
+
+ + + + + +
+   + + +

+Deallocate the dynamic string and its contents. +

+

+Parameters:
+ + +
self  +Dynamic string
+
+

+ + + + +
+ + + + + + + + + + +
TRIO_STRING_PUBLIC char* trio_string_extract trio_string_t *   self
+
+ + + + + +
+   + + +

+Extract the content. +

+

+Parameters:
+ + +
self  +Dynamic String
+
+Returns:
+Content of dynamic string.
The content is removed from the dynamic string. This enables destruction of the dynamic string without deallocation of the content.
+

+ + + + +
+ + + + + + + + + + + + + + + + + + + +
TRIO_STRING_PUBLIC char* trio_string_get trio_string_t *   self,
int   offset
+
+ + + + + +
+   + + +

+Get a pointer to the content. +

+

+Parameters:
+ + + +
self  +Dynamic string.
offset  +Offset into content.
+
+Returns:
+Pointer to the content.
Offset can be zero, positive, or negative. If offset is zero, then the start of the content will be returned. If offset is positive, then a pointer to offset number of characters from the beginning of the content is returned. If offset is negative, then a pointer to offset number of characters from the ending of the string, starting at the terminating zero, is returned.
+

+ + + + +
+ + + + + + + + + + + + + + + + + + + +
TRIO_STRING_PUBLIC void trio_xstring_set trio_string_t *   self,
char *   buffer
+
+ + + + + +
+   + + +

+Set the content of the dynamic string. +

+

+Parameters:
+ + + +
self  +Dynamic String
buffer  +The new content.
+
Sets the content of the dynamic string to a copy buffer. An existing content will be deallocated first, if necessary. +

+

+Remarks:
+ This function will make a copy of buffer. You are responsible for deallocating buffer yourself.
+


+ + + -- cgit v1.2.3