17 #ifndef STRING_TYPE_H_ 18 #define STRING_TYPE_H_ 277 #endif //STRING_TYPE_H_ E_MCL_ERROR_CODE string_initialize_dynamic(const char *value, mcl_size_t value_length, string_t **string)
Initializes a dynamic string_t object with the given value and length.
char * buffer
Buffer of string handle.
E_MCL_ERROR_CODE string_initialize_static(const char *value, mcl_size_t value_length, string_t **string)
Initializes a static string_t object with the given value and length.
E_MCL_STRING_TYPE
This type defines the different kind of string behaviors during string initialization and destroy...
void string_release(string_t *string)
Clears the content of the string. And deallocates the memory.
String utility module implementation file.
E_MCL_ERROR_CODE
MCL Error code definitions. Every function returning an error code uses this enum values...
Strings with this type will NOT allocate its buffer during initialization (buffer only points of the ...
E_MCL_STRING_TYPE type
Type of copy and destroy.
E_MCL_ERROR_CODE string_concatenate_cstr(string_t *string, char *c_string, string_t **result)
Concatenates two strings of type string_t into a string_t.
E_MCL_ERROR_CODE string_initialize(const string_t *other, string_t **string)
Initializes an string_t object with another one.
E_MCL_ERROR_CODE string_initialize_new(const char *value, mcl_size_t value_length, string_t **string)
Initializes a new string_t object with the given value and length.
void string_destroy(string_t **string)
Destroys the allocated resources of the string.
Strings with this type will allocates its buffer during initialization (copies the initial value to i...
E_MCL_ERROR_CODE string_concatenate(string_t *string_1, string_t *string_2, string_t **result)
Concatenates a C string (i.e. a char array)
mcl_size_t length
Length of buffer.
E_MCL_ERROR_CODE string_replace(string_t *source, const char *old_string, const char *new_string, string_t **result)
Replaces old_string with new_string.
E_MCL_ERROR_CODE string_split(string_t *string, const char token, list_t **string_list)
Splits the string with the given char and returns the result as an list_t of string_t's.
E_MCL_ERROR_CODE string_compare_with_cstr(const string_t *string, const char *other)
Compare the contents of string_t with a C string.
E_MCL_ERROR_CODE string_convert_binary_to_hex(const mcl_uint8_t *buffer, mcl_size_t buffer_size, string_t **hex_data)
E_MCL_ERROR_CODE string_compare(const string_t *string, const string_t *other)
Compare the contents of two string_t's.
E_MCL_ERROR_CODE string_set(string_t *string, const char *value, mcl_size_t value_length)
Sets the buffer of the string with a new value.
Strings with this type will NOT allocate its buffer during initialization (buffer only points of the ...