Defines helper functions and structs for string handling. More...
#include <stdlib.h>#include <string.h>#include <ctype.h>#include <assert.h>

Go to the source code of this file.
| Data Structures | |
| struct | CMimeStringList_T | 
| A simple list with strings.  More... | |
| Macros | |
| #define | cmime_string_list_get_count(sl) ((int)sl->count) | 
| Enumerations | |
| enum | CMimeStringEncodingType_T { CMIME_STRING_ENCODING_B64, CMIME_STRING_ENCODING_QP } | 
| Possible string encoding types.  More... | |
| Functions | |
| CMimeStringList_T * | cmime_string_list_new (void) | 
| Creates a new CMimeStringList_T object.  More... | |
| void | cmime_string_list_free (CMimeStringList_T *sl) | 
| Free a CMimeStringList_t object.  More... | |
| void | cmime_string_list_insert (CMimeStringList_T *sl, const char *s) | 
| Insert new string into list.  More... | |
| char * | cmime_string_list_get (CMimeStringList_T *sl, int pos) | 
| Return string at given position.  More... | |
| char * | cmime_string_strip (char *s) | 
| Strip leading/trailing spaces from string. This function doesn't allocate or reallocate any memory; it modifies string in place.  More... | |
| char * | cmime_string_chomp (char *s) | 
| remove trailing newline from string This function doesn't allocate or reallocate any memory; it modifies string in place.  More... | |
| int | cmime_string_is_7bit (const char *s) | 
| Determine if given string is 7bit only or not.  More... | |
| int | cmime_string_is_8bit (const char *s) | 
| Determine if given string contains 8bit characters.  More... | |
| char * | cmime_string_encode_to_7bit (const char *s, CMimeStringEncodingType_T t) | 
| Convert given string to 7 bit mime encoded string based on RFC 2047.  More... | |
Defines helper functions and structs for string handling.
| #define cmime_string_list_get_count | ( | sl | ) | ((int)sl->count) | 
| char* cmime_string_chomp | ( | char * | s | ) | 
remove trailing newline from string This function doesn't allocate or reallocate any memory; it modifies string in place.
| s | a string | 
| char* cmime_string_encode_to_7bit | ( | const char * | s, | 
| CMimeStringEncodingType_T | t | ||
| ) | 
Convert given string to 7 bit mime encoded string based on RFC 2047.
char
| s | string to encode | 
| t | CMimeStringEncodingType_T encoding | 
| int cmime_string_is_7bit | ( | const char * | s | ) | 
Determine if given string is 7bit only or not.
int cmime_string_is_7bit(const char *s)
| s | string to check | 
| int cmime_string_is_8bit | ( | const char * | s | ) | 
Determine if given string contains 8bit characters.
int cmime_string_is_8bit(const char *s)
| s | string to check | 
| void cmime_string_list_free | ( | CMimeStringList_T * | sl | ) | 
Free a CMimeStringList_t object.
| sl | CMimeStringList_T pointer | 
| char* cmime_string_list_get | ( | CMimeStringList_T * | sl, | 
| int | pos | ||
| ) | 
Return string at given position.
| sl | CMimeStringList_T pointer | 
| pos | String position in list | 
| void cmime_string_list_insert | ( | CMimeStringList_T * | sl, | 
| const char * | s | ||
| ) | 
Insert new string into list.
| sl | CMimeStringList_T pointer | 
| s | a string | 
| CMimeStringList_T* cmime_string_list_new | ( | void | ) | 
Creates a new CMimeStringList_T object.
| char* cmime_string_strip | ( | char * | s | ) | 
Strip leading/trailing spaces from string. This function doesn't allocate or reallocate any memory; it modifies string in place.
| s | string with spaces |