Etk
Main Page Object Hierarchy Data Structures Related Pages
Etk

etk_string.h File Reference


Detailed Description


Data Structures

struct  Etk_String
 [Widget] Etk_String is an object that offers convenient methods to manipulate a string More...

Defines

#define ETK_STRING_TYPE   (etk_string_type_get())
#define ETK_STRING(obj)   (ETK_OBJECT_CAST((obj), ETK_STRING_TYPE, Etk_String))
#define ETK_IS_STRING(obj)   (ETK_OBJECT_CHECK_TYPE((obj), ETK_STRING_TYPE))

Functions

Etk_String * etk_string_new (const char *value)
 Creates a new string.
Etk_String * etk_string_new_sized (const char *value, int size)
 Creates a new string, with a specific size.
Etk_String * etk_string_new_printf (const char *format,...)
 Creates a new string, and sets its default value from the given format and arguments.
Etk_String * etk_string_new_vprintf (const char *format, va_list args)
 Creates a new string, and sets its default value from the given format and arguments.
Etk_String * etk_string_copy (const Etk_String *string)
 Creates a new string and copies the text from string.
const char * etk_string_get (Etk_String *string)
 Gets the string as an array of chars.
int etk_string_length_get (Etk_String *string)
 Gets the length of the string.
Etk_String * etk_string_truncate (Etk_String *string, int length)
 Truncates the string.
Etk_String * etk_string_delete (Etk_String *string, int pos, int size)
 Removes from the string a segment of size chars from the position pos.
Etk_String * etk_string_clear (Etk_String *string)
 Clears the string: all the allocated memory will be freed, and the length of the string will be set to 0.
Etk_String * etk_string_set (Etk_String *string, const char *value)
 Sets the value of a string.
Etk_String * etk_string_set_sized (Etk_String *string, const char *value, int size)
 Sets the value of a string, with a specific size.
Etk_String * etk_string_set_printf (Etk_String *string, const char *format,...)
 Sets the value of the string from the given format and arguments.
Etk_String * etk_string_set_vprintf (Etk_String *string, const char *format, va_list args)
 Sets the value of the string from the format and the arguments.
Etk_String * etk_string_prepend (Etk_String *string, const char *text)
 Prepends a text to a string.
Etk_String * etk_string_prepend_sized (Etk_String *string, const char *text, int length)
 Prepends a text with a specific length to a string.
Etk_String * etk_string_prepend_char (Etk_String *string, char c)
 Prepends a character to a string.
Etk_String * etk_string_prepend_printf (Etk_String *string, const char *format,...)
 Prepends a text to the string, from the given format and arguments.
Etk_String * etk_string_prepend_vprintf (Etk_String *string, const char *format, va_list args)
 Prepends a text to the string, from the given format and arguments.
Etk_String * etk_string_append (Etk_String *string, const char *text)
 Appends a text to a string.
Etk_String * etk_string_append_sized (Etk_String *string, const char *text, int length)
 Appends a text with a specific length to a string.
Etk_String * etk_string_append_char (Etk_String *string, char c)
 Appends a character to a string.
Etk_String * etk_string_append_printf (Etk_String *string, const char *format,...)
 Appends a text to the string, from the given format and arguments.
Etk_String * etk_string_append_vprintf (Etk_String *string, const char *format, va_list args)
 Appends a text to the string, from the given format and arguments.
Etk_String * etk_string_insert (Etk_String *string, int pos, const char *text)
 Inserts a text into a string, at a given position.
Etk_String * etk_string_insert_sized (Etk_String *string, int pos, const char *text, int length)
 Inserts a text with a specific length into a string, at a given position.
Etk_String * etk_string_insert_char (Etk_String *string, int pos, char c)
 Inserts a character into a string, at a given position.
Etk_String * etk_string_insert_printf (Etk_String *string, int pos, const char *format,...)
 Inserts a text into a string, from the given format and arguments, at a given position.
Etk_String * etk_string_insert_vprintf (Etk_String *string, int pos, const char *format, va_list args)
 Inserts a text into a string, from the given format and arguments, at a given position.