Lhogho
0.0.028
|
Go to the source code of this file.
Functions | |
size_t | m_strlen (const TCHAR *str) |
calculates string length More... | |
int | m_strcmp (const TCHAR *str1, const TCHAR *str2) |
compares two strings More... | |
TCHAR * | m_strcpy (TCHAR *dest, const TCHAR *src) |
copy string More... | |
BOOL | m_isspace (TCHAR chr) |
test if char is space More... | |
RESULT | m_strndup (TCHAR **dest_ptr, const TCHAR *src, size_t num_chars) |
duplicate string, but no more than num_chars symbols More... | |
RESULT | m_strdup (TCHAR **dest_ptr, const TCHAR *src) |
duplicate string. Allocate memory for destination More... | |
TCHAR * | m_fgets (FILE *file, TCHAR *buffer, size_t buffer_size, size_t *out_size_ptr) |
Read a line from file. More... | |
void | m_fputs (FILE *file, const TCHAR *buffer) |
prints a line to file More... | |
void | m_fputs_ascii (FILE *file, const char *buffer) |
prints a line to file, convert it to UNICODE if needed More... | |
void | m_fputc (FILE *file, TCHAR tchar) |
prints a symbol to file More... | |
size_t m_strlen | ( | const TCHAR * | str) |
str | the string |
Calculates string length in symbols. Works with char and w_char
Definition at line 34 of file string_functions.c.
str1 | first string |
str2 | second string |
Comare two strings. Return negative value if first is less than second positive value if first is great than second and zero if strings are equal
Definition at line 54 of file string_functions.c.
dest | destination string |
src | source string |
Copy string value to given pointer. User must supply enought memory
Definition at line 75 of file string_functions.c.
dest_ptr | pointer to destination string |
src | source string |
num_chars | number of characters to copy. |
Copy string value to given pointer, byt no more than num_chars
symbols. Allocates memory for destination. Not copy the 0 byte if source is longer than wanted length
Definition at line 114 of file string_functions.c.
dest_ptr | pointer to destination string |
src | source string |
Duplicate string. Allocate memory for destination. If memory problems occured return error.
Definition at line 137 of file string_functions.c.
file | file to read from |
buffer | buffer to read in |
buffer_size | size of space in the buffer |
out_size_ptr | size of line readed |
Read characters from given open file until new line symbol is reached or input buffer is full. Returns the count of really readed symbols in parameter and pointer to the buffer. If error occured during read process returns NULL
Definition at line 159 of file string_functions.c.
file | file to write in |
buffer | string to write |
Writes a line to the file. Buffer must be a valid nul-terminated string
Definition at line 216 of file string_functions.c.
void m_fputs_ascii | ( | FILE * | file, |
const char * | buffer | ||
) |
file | file to write in |
buffer | string to write |
Writes a line to the file. If program works in unicode mode the string is converted from ASCII to unicode.
Definition at line 232 of file string_functions.c.
file | file to write in |
tchar | symbol to write |
Writes a symbol to file.
Definition at line 258 of file string_functions.c.