File: str.h

package info (click to toggle)
udo 6.4.1-9
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 5,680 kB
  • sloc: ansic: 42,702; makefile: 81; cpp: 19
file content (88 lines) | stat: -rw-r--r-- 3,903 bytes parent folder | download | duplicates (6)
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
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
/*	############################################################
	# @(#) str.h
	# @(#)
	# @(#) Copyright (c) 1995-2001 by Dirk Hagedorn
	# @(#) Dirk Hagedorn (udo@dirk-hagedorn.de)
	#
	# This program is free software; you can redistribute it and/or
	# modify it under the terms of the GNU General Public License
	# as published by the Free Software Foundation; either version 2
	# of the License, or (at your option) any later version.
	# 
	# This program is distributed in the hope that it will be useful,
	# but WITHOUT ANY WARRANTY; without even the implied warranty of
	# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
	# GNU General Public License for more details.
	# 
	# You should have received a copy of the GNU General Public License
	# along with this program; if not, write to the Free Software
	# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
	# 
	############################################################	*/

/*	############################################################
	# Typen
	############################################################	*/

/* New in r6pl15 [NHz] */
struct size_brackets
{
	size_t format;
	size_t content;
};

/*	############################################################
	# Variablen
	############################################################	*/

/*	############################################################
	# Funktionen
	############################################################	*/

GLOBAL char *chrcat (char *dest, const char c);
GLOBAL char *strinsert ( char *string, const char *insert);

GLOBAL void replace_char ( char *string, const char *replace, const char *by );

GLOBAL int replace_once ( char *source, const char *replace, const char *by);
GLOBAL int replace_last ( char *source, const char *replace, const char *by);
GLOBAL int replace_all ( char *source, const char *replace, const char *by);

GLOBAL int qreplace_once ( char *source, const char *replace, const size_t rlen, const char *by, const size_t blen);
GLOBAL int qreplace_last ( char *source, const char *replace, const size_t rlen, const char *by, const size_t blen);
GLOBAL int qreplace_all ( char *source, const char *replace, const size_t rlen, const char *by, const size_t blen);

GLOBAL int delete_once ( char *source, const char *to_delete );
GLOBAL int delete_last ( char *source, const char *to_delete );
GLOBAL int delete_all ( char *source, const char *to_delete );

GLOBAL int qdelete_once ( char *source, const char *to_delete, const size_t dlen );
GLOBAL int qdelete_last ( char *source, const char *to_delete, const size_t dlen );
GLOBAL int qdelete_all ( char *source, const char *to_delete, const size_t dlen );


GLOBAL void del_right_spaces ( char *s );
GLOBAL void del_whitespaces ( char *s);

GLOBAL size_t get_brackets_ptr ( char *s, char **cont, char **data );
GLOBAL struct size_brackets get_two_brackets_ptr ( char *s, char **cont_format, char **cont_content, char **data );
GLOBAL char *get_8bit_ptr ( char *s );
GLOBAL char *get_section_ptr ( char *s );
GLOBAL char *get_1stchar_ptr ( char *s );

GLOBAL void tabs2spaces (char *s, const int tw);
GLOBAL char *itoroman ( int value, char *string );
GLOBAL void my_strupr ( char *string );
GLOBAL void my_strlwr ( char *string );
GLOBAL int my_stricmp ( const char *s1, const char *s2 );
GLOBAL int my_strnicmp ( const char *s1, const char *s2, size_t len );

GLOBAL char *um_strcpy(char *dest, const char *src, size_t max, const char *place);
GLOBAL char *um_strncpy(char *dest, const char *src, size_t n, size_t max, const char *place);
GLOBAL char *um_strcat(char *dest, const char *src, size_t max, const char *place);
GLOBAL char *um_strncat(char *dest, const char *src, size_t n, size_t max, const char *place);

/*	############################################################
	# str.h
	############################################################	*/