FreeRDP
DynamicStrings

Functions

TRIO_PUBLIC_STRING trio_string_t *trio_string_create TRIO_ARGS1 ((initial_size), int initial_size)
 
TRIO_PUBLIC_STRING void trio_string_destroy TRIO_ARGS1 ((self), trio_string_t *self)
 
TRIO_PUBLIC_STRING char *trio_string_get TRIO_ARGS2 ((self, offset), trio_string_t *self, int offset)
 
TRIO_PUBLIC_STRING void trio_xstring_set TRIO_ARGS2 ((self, buffer), trio_string_t *self, char *buffer)
 
TRIO_PUBLIC_STRING int trio_string_append TRIO_ARGS2 ((self, other), trio_string_t *self, trio_string_t *other)
 
TRIO_PUBLIC_STRING int trio_xstring_append TRIO_ARGS2 ((self, other), trio_string_t *self, TRIO_CONST char *other)
 
TRIO_PUBLIC_STRING int trio_xstring_append_char TRIO_ARGS2 ((self, character), trio_string_t *self, char character)
 
TRIO_PUBLIC_STRING int trio_xstring_append_max TRIO_ARGS3 ((self, other, max), trio_string_t *self, TRIO_CONST char *other, size_t max)
 
TRIO_PUBLIC_STRING trio_string_t *trio_string_duplicate TRIO_ARGS1 ((other), trio_string_t *other)
 
TRIO_PUBLIC_STRING trio_string_t *trio_xstring_duplicate TRIO_ARGS1 ((other), TRIO_CONST char *other)
 
TRIO_PUBLIC_STRING int trio_string_equal_max TRIO_ARGS3 ((self, max, other), trio_string_t *self, size_t max, trio_string_t *other)
 
TRIO_PUBLIC_STRING int trio_xstring_equal_max TRIO_ARGS3 ((self, max, other), trio_string_t *self, size_t max, TRIO_CONST char *other)
 
TRIO_PUBLIC_STRING size_t trio_string_format_date_max TRIO_ARGS4 ((self, max, format, datetime), trio_string_t *self, size_t max, TRIO_CONST char *format, TRIO_CONST struct tm *datetime)
 
TRIO_PUBLIC_STRING char *trio_string_index TRIO_ARGS2 ((self, character), trio_string_t *self, int character)
 

Detailed Description

Function Documentation

◆ TRIO_ARGS1() [1/4]

TRIO_PUBLIC_STRING trio_string_t* trio_string_create TRIO_ARGS1 ( (initial_size)  ,
int  initial_size 
)

Create a new dynamic string.

Parameters
initial_sizeInitial size of the buffer.
Returns
Newly allocated dynamic string, or NULL if memory allocation failed.
Here is the call graph for this function:

◆ TRIO_ARGS1() [2/4]

TRIO_PUBLIC_STRING trio_string_t* trio_xstring_duplicate TRIO_ARGS1 ( (other)  ,
TRIO_CONST char *  other 
)
Here is the call graph for this function:

◆ TRIO_ARGS1() [3/4]

TRIO_PUBLIC_STRING trio_string_t* trio_string_duplicate TRIO_ARGS1 ( (other)  ,
trio_string_t *  other 
)
Here is the call graph for this function:

◆ TRIO_ARGS1() [4/4]

TRIO_PUBLIC_STRING int trio_string_upper TRIO_ARGS1 ( (self)  ,
trio_string_t *  self 
)

Deallocate the dynamic string and its contents.

Parameters
selfDynamic string

Extract the content.

Parameters
selfDynamic 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_ARGS2() [1/6]

TRIO_PUBLIC_STRING void trio_xstring_set TRIO_ARGS2 ( (self, buffer)  ,
trio_string_t *  self,
char *  buffer 
)

Set the content of the dynamic string.

Parameters
selfDynamic String
bufferThe 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.

◆ TRIO_ARGS2() [2/6]

TRIO_PUBLIC_STRING int trio_xstring_append_char TRIO_ARGS2 ( (self, character)  ,
trio_string_t *  self,
char  character 
)

◆ TRIO_ARGS2() [3/6]

TRIO_PUBLIC_STRING char *trio_string_index_last TRIO_ARGS2 ( (self, character)  ,
trio_string_t *  self,
int  character 
)

◆ TRIO_ARGS2() [4/6]

TRIO_PUBLIC_STRING char* trio_string_get TRIO_ARGS2 ( (self, offset)  ,
trio_string_t *  self,
int  offset 
)

Get a pointer to the content.

Parameters
selfDynamic string.
offsetOffset 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_ARGS2() [5/6]

TRIO_PUBLIC_STRING char *trio_xstring_substring TRIO_ARGS2 ( (self, other)  ,
trio_string_t *  self,
TRIO_CONST char *  other 
)

◆ TRIO_ARGS2() [6/6]

TRIO_PUBLIC_STRING char *trio_string_substring TRIO_ARGS2 ( (self, other)  ,
trio_string_t *  self,
trio_string_t *  other 
)

Append the second string to the first.

Parameters
selfDynamic string to be modified.
otherDynamic string to copy from.
Returns
Boolean value indicating success or failure.

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

Parameters
selfDynamic string to be modified.
otherDynamic string to copy from.
Returns
Boolean value indicating success or failure.

◆ TRIO_ARGS3() [1/3]

TRIO_PUBLIC_STRING int trio_xstring_equal_case_max TRIO_ARGS3 ( (self, max, other)  ,
trio_string_t *  self,
size_t  max,
TRIO_CONST char *  other 
)

◆ TRIO_ARGS3() [2/3]

TRIO_PUBLIC_STRING int trio_string_equal_case_max TRIO_ARGS3 ( (self, max, other)  ,
trio_string_t *  self,
size_t  max,
trio_string_t *  other 
)

◆ TRIO_ARGS3() [3/3]

TRIO_PUBLIC_STRING int trio_xstring_append_max TRIO_ARGS3 ( (self, other, max)  ,
trio_string_t *  self,
TRIO_CONST char *  other,
size_t  max 
)

◆ TRIO_ARGS4()

TRIO_PUBLIC_STRING size_t trio_string_format_date_max TRIO_ARGS4 ( (self, max, format, datetime)  ,
trio_string_t *  self,
size_t  max,
TRIO_CONST char *  format,
TRIO_CONST struct tm *  datetime 
)