FreeBASIC  0.91.0
hlp-str.bi
Go to the documentation of this file.
1 #ifndef __HELP_STR_BI__
2 #define __HELP_STR_BI__
3 
4 declare sub ZstrAssign _
5  ( _
6  byval dst as zstring ptr ptr, _
7  byval src as zstring ptr _
8  )
9 
10 declare sub ZstrAssignW _
11  ( _
12  byval dst as zstring ptr ptr, _
13  byval src as wstring ptr _
14  )
15 
16 declare sub ZstrConcatAssign _
17  ( _
18  byval dst as zstring ptr ptr, _
19  byval src as zstring ptr _
20  )
21 
22 declare sub ZstrConcatAssignW _
23  ( _
24  byval dst as zstring ptr ptr, _
25  byval src as wstring ptr _
26  )
27 
28 declare function ZstrDup _
29  ( _
30  byval s as zstring ptr _
31  ) as zstring ptr
32 
33 declare sub WstrAssign _
34  ( _
35  byval dst as wstring ptr ptr, _
36  byval src as wstring ptr _
37  )
38 
39 declare sub WstrAssignA _
40  ( _
41  byval dst as wstring ptr ptr, _
42  byval src as zstring ptr _
43  )
44 
45 declare sub WstrConcatAssign _
46  ( _
47  byval dst as wstring ptr ptr, _
48  byval src as wstring ptr _
49  )
50 
51 declare sub WstrConcatAssignW _
52  ( _
53  byval dst as wstring ptr ptr, _
54  byval src as zstring ptr _
55  )
56 
57 declare function WstrDup _
58  ( _
59  byval s as wstring ptr _
60  ) as wstring ptr
61 
62 
63 declare function hReEscape _
64  ( _
65  byval text as zstring ptr, _
66  byref textlen as integer, _
67  byref isunicode as integer _
68  ) as zstring ptr
69 
70 declare function hReEscapeW _
71  ( _
72  byval text as wstring ptr, _
73  byref textlen as integer _
74  ) as wstring ptr
75 
76 declare function hEscape _
77  ( _
78  byval text as const zstring ptr _
79  ) as const zstring ptr
80 
81 declare function hEscapeW _
82  ( _
83  byval text as wstring ptr _
84  ) as zstring ptr
85 
86 declare function hUnescape _
87  ( _
88  byval text as zstring ptr _
89  ) as zstring ptr
90 
91 declare function hUnescapeW _
92  ( _
93  byval text as wstring ptr _
94  ) as wstring ptr
95 
96 declare function hHasEscape _
97  ( _
98  byval text as zstring ptr _
99  ) as integer
100 
101 declare function hHasEscapeW _
102  ( _
103  byval text as wstring ptr _
104  ) as integer
105 
106 declare function hReplace _
107  ( _
108  byval text as zstring ptr, _
109  byval oldtext as zstring ptr, _
110  byval newtext as zstring ptr _
111  ) as string
112 
113 declare function hReplaceW _
114  ( _
115  byval orgtext as wstring ptr, _
116  byval oldtext as wstring ptr, _
117  byval newtext as wstring ptr _
118  ) as wstring ptr
119 
120 declare function hReplaceChar _
121  ( _
122  byval orgtext as zstring ptr, _
123  byval oldchar as integer, _
124  byval newchar as integer _
125  ) as zstring ptr
126 
127 declare function hCharNeedsEscaping _
128  ( _
129  byval ch as integer, _
130  byval quotechar as integer _
131  ) as integer
132 
133 declare function hIsValidHexDigit( byval ch as integer ) as integer
134 
135 '':::::
136 #define ZstrAllocate(chars) xallocate( chars + 1 )
137 
138 #define ZstrFree(p) if( p <> NULL ) then : deallocate( p ) : end if
139 
140 #define WstrAllocate(chars) xallocate( (chars + 1) * len( wstring ) )
141 
142 #define WstrFree(p) if( p <> NULL ) then : deallocate( p ) : end if
143 
144 #endif ''__HELP_STR_BI__
145