-
Notifications
You must be signed in to change notification settings - Fork 0
/
strutils.h
43 lines (29 loc) · 1.08 KB
/
strutils.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
#include <ctype.h>
#include <ctype.h>
/**
* removes spaces at the beginning
* of the string
**/
char *str_remove_sps_sol( char *dest, const char *str );
/**
* receives a fileName with path
* and returns only the fileName
**/
char *getFileName(char *destiny, const char *fileWithPath);
char* getParamName(char* target, const char* str);
char* getParamValue(char* target, const char* str);
/* converts all chacarters to uppercase */
void str_all_to_upper( char *str );
/* removes spaces and other meaningless characthers from end of line */
char* str_remove_sps_eol( char *str );
/* char is invisible: if char = ' ' or '\n' or '\t' or '\r' */
char char_is_invisible( const char c );
/* to align at right */
void str_fill_spaces_left( char *dest, const char *str, int n );
/* to align at left */
void str_fill_spaces_right( char *dest, const char *str, int n );
/* to align at center */
void str_fill_spaces_both( char *dest, const char *str, int n );
/* remove repeated spacing characters (e.g. spaces of tabs ) */
void str_remove_dbl_spaces( char *str );
char *str_clear_spaces(char *str);