~ubuntu-branches/debian/lenny/fpc/lenny

« back to all changes in this revision

Viewing changes to fpcdocs/strings.xml

  • Committer: Bazaar Package Importer
  • Author(s): Mazen Neifer, Torsten Werner, Mazen Neifer
  • Date: 2008-05-17 17:12:11 UTC
  • mfrom: (3.1.9 intrepid)
  • Revision ID: james.westby@ubuntu.com-20080517171211-9qi33xhd9evfa0kg
Tags: 2.2.0-dfsg1-9
[ Torsten Werner ]
* Add Mazen Neifer to Uploaders field.

[ Mazen Neifer ]
* Moved FPC sources into a version dependent directory from /usr/share/fpcsrc
  to /usr/share/fpcsrc/${FPCVERSION}. This allow installing more than on FPC
  release.
* Fixed far call issue in compiler preventing building huge binearies.
  (closes: #477743)
* Updated building dependencies, recomennded and suggested packages.
* Moved fppkg to fp-utils as it is just a helper tool and is not required by
  compiler.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
<?xml version="1.0" encoding="ISO8859-1"?>
 
2
<fpdoc-descriptions>
 
3
<!-- 
 
4
   $Id: strings.xml,v 1.2 2004/09/01 19:06:19 michael Exp $ 
 
5
   This file is part of the FPC documentation. 
 
6
   Copyright (C) 1997, by Michael Van Canneyt 
 
7
 
 
8
   The FPC documentation is free text; you can redistribute it and/or 
 
9
   modify it under the terms of the GNU Library General Public License as 
 
10
   published by the Free Software Foundation; either version 2 of the 
 
11
   License, or (at your option) any later version. 
 
12
 
 
13
   The FPC Documentation is distributed in the hope that it will be useful, 
 
14
   but WITHOUT ANY WARRANTY; without even the implied warranty of 
 
15
   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU 
 
16
   Library General Public License for more details. 
 
17
 
 
18
   You should have received a copy of the GNU Library General Public 
 
19
   License along with the FPC documentation; see the file COPYING.LIB.  If not, 
 
20
   write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, 
 
21
   Boston, MA 02111-1307, USA.  
 
22
--> 
 
23
<package name="rtl">
 
24
<module name="strings">
 
25
<short>Null-terminated string (PChar) routines.</short>
 
26
<!-- \FPCexampledir{stringex -->
 
27
<descr>
 
28
<p>
 
29
This chapter describes the <var>STRINGS</var> unit for Free Pascal. 
 
30
This unit is system independent, and therefore works on all supported 
 
31
platforms.
 
32
</p>
 
33
</descr>
 
34
 
 
35
<element name="StrAlloc">
 
36
<short>Allocate memory for a new null-terminated string on the heap</short>
 
37
<descr>
 
38
<var>StrAlloc</var> reserves memory on the heap for a string with length <var>Len</var>,
 
39
terminating <var>#0</var> included, and returns a pointer to it.
 
40
</descr>
 
41
<errors>
 
42
If there is not enough memory, a run-time error occurs.
 
43
</errors>
 
44
<seealso>
 
45
<link id="StrNew"/>
 
46
<link id="StrPCopy"/>.
 
47
</seealso>
 
48
</element>
 
49
 
 
50
<element name="StrCat">
 
51
<short>Concatenate 2 null-terminated strings.</short>
 
52
<descr>
 
53
Attaches <var>Source</var> to <var>Dest</var> and returns <var>Dest</var>.
 
54
</descr>
 
55
<errors>
 
56
No length checking is performed.
 
57
</errors>
 
58
<seealso>
 
59
<link id="StrLCat"/>
 
60
</seealso>
 
61
<example file="stringex/ex11"/>
 
62
</element>
 
63
 
 
64
<element name="StrComp">
 
65
<short>Compare 2 null-terminated strings, case sensitive.</short>
 
66
<descr>
 
67
<p>
 
68
Compares the null-terminated strings <var>S1</var> and <var>S2</var>.
 
69
The result is 
 
70
</p>
 
71
<ul>
 
72
<li> A negative <var>Longint</var> when <var>S1&lt;S2</var>.
 
73
</li>
 
74
<li> 0 when <var>S1=S2</var>.
 
75
</li>
 
76
<li> A positive <var>Longint</var> when <var>S1&gt;S2</var>.
 
77
</li>
 
78
</ul>
 
79
<p>
 
80
For an example, see <link id="StrLComp"/>.
 
81
</p>
 
82
</descr>
 
83
<errors>
 
84
None.
 
85
</errors>
 
86
<seealso>
 
87
<link id="StrLComp"/>
 
88
<link id="StrIComp"/>
 
89
<link id="StrLIComp"/>
 
90
</seealso>
 
91
</element>
 
92
 
 
93
<element name="StrCopy">
 
94
<short>Copy a null-terminated string</short>
 
95
<descr>
 
96
Copy the null terminated string in <var>Source</var> to <var>Dest</var>, and
 
97
returns a pointer to <var>Dest</var>. <var>Dest</var> needs enough room to contain
 
98
<var>Source</var>, i.e. <var>StrLen(Source)+1</var> bytes.
 
99
</descr>
 
100
<errors>
 
101
No length checking is performed.
 
102
</errors>
 
103
<seealso>
 
104
<link id="StrPCopy"/>
 
105
<link id="StrLCopy"/>
 
106
<link id="StrECopy"/>
 
107
</seealso>
 
108
<example file="stringex/ex4"/>
 
109
</element>
 
110
 
 
111
 
 
112
<element name="StrDispose">
 
113
<short>disposes of a null-terminated string on the heap</short>
 
114
<descr>
 
115
Removes the string in <var>P</var> from the heap and releases the memory.
 
116
</descr>
 
117
<errors>
 
118
None.
 
119
</errors>
 
120
<seealso>
 
121
<link id="StrNew"/>
 
122
</seealso>
 
123
<example file="stringex/ex17"/>
 
124
</element>
 
125
 
 
126
<element name="StrECopy">
 
127
<short>Copy a null-terminated string, return a pointer to the end.</short>
 
128
<descr>
 
129
Copies the Null-terminated string in <var>Source</var> to <var>Dest</var>, and
 
130
returns a pointer to the end (i.e. the terminating Null-character) of the
 
131
copied string.
 
132
</descr>
 
133
<errors>
 
134
No length checking is performed.
 
135
</errors>
 
136
<seealso>
 
137
<link id="StrLCopy"/>
 
138
<link id="StrCopy"/>
 
139
</seealso>
 
140
<example file="stringex/ex6"/>
 
141
</element>
 
142
 
 
143
<element name="StrEnd">
 
144
<short>Return a pointer to the end of a null-terminated string</short>
 
145
<descr>
 
146
Returns a pointer to the end of <var>P</var>. (i.e. to the terminating
 
147
null-character.
 
148
</descr>
 
149
<errors>
 
150
None.
 
151
</errors>
 
152
<seealso>
 
153
<link id="StrLen"/>
 
154
</seealso>
 
155
<example file="stringex/ex7"/>
 
156
</element>
 
157
 
 
158
<element name="StrIComp">
 
159
<short>Compare 2 null-terminated strings, case insensitive.</short>
 
160
<descr>
 
161
<p>
 
162
Compares the null-terminated strings <var>S1</var> and <var>S2</var>, ignoring case.
 
163
The result is 
 
164
</p>
 
165
<ul>
 
166
<li> A negative <var>Longint</var> when <var>S1&lt;S2</var>.
 
167
</li>
 
168
<li> 0 when <var>S1=S2</var>.
 
169
</li>
 
170
<li> A positive <var>Longint</var> when <var>S1&gt;S2</var>.
 
171
</li>
 
172
</ul>
 
173
</descr>
 
174
<errors>
 
175
None.
 
176
</errors>
 
177
<seealso>
 
178
<link id="StrLComp"/>
 
179
<link id="StrComp"/>
 
180
<link id="StrLIComp"/>
 
181
</seealso>
 
182
<example file="stringex/ex8"/>
 
183
</element>
 
184
 
 
185
<element name="StrLCat">
 
186
<short>Concatenate 2 null-terminated strings, with length boundary.</short>
 
187
<descr>
 
188
Adds <var>MaxLen</var> characters from <var>Source</var> to <var>Dest</var>, and adds a
 
189
terminating null-character. Returns <var>Dest</var>.
 
190
</descr>
 
191
<errors>
 
192
None.
 
193
</errors>
 
194
<seealso>
 
195
<link id="StrCat"/>
 
196
</seealso>
 
197
<example file="stringex/ex12"/>
 
198
</element>
 
199
 
 
200
 
 
201
<element name="StrLComp">
 
202
<short>Compare limited number of characters of 2 null-terminated strings </short>
 
203
<descr>
 
204
<p>
 
205
Compares maximum <var>L</var> characters of the null-terminated strings 
 
206
<var>S1</var> and <var>S2</var>. 
 
207
The result is 
 
208
</p>
 
209
<ul>
 
210
<li> A negative <var>Longint</var> when <var>S1&lt;S2</var>.
 
211
</li>
 
212
<li> 0 when <var>S1=S2</var>.
 
213
</li>
 
214
<li> A positive <var>Longint</var> when <var>S1&gt;S2</var>.
 
215
</li>
 
216
</ul>
 
217
</descr>
 
218
<errors>
 
219
None.
 
220
</errors>
 
221
<seealso>
 
222
<link id="StrComp"/>
 
223
<link id="StrIComp"/>
 
224
<link id="StrLIComp"/>
 
225
</seealso>
 
226
<example file="stringex/ex8"/>
 
227
</element>
 
228
 
 
229
 
 
230
<element name="StrLCopy">
 
231
<short>Copy a null-terminated string, limited in length.</short>
 
232
<descr>
 
233
Copies <var>MaxLen</var> characters from <var>Source</var> to <var>Dest</var>, and makes
 
234
<var>Dest</var> a null terminated string. 
 
235
</descr>
 
236
<errors>
 
237
No length checking is performed.
 
238
</errors>
 
239
<seealso>
 
240
<link id="StrCopy"/>
 
241
<link id="StrECopy"/>
 
242
</seealso>
 
243
<example file="stringex/ex5"/>
 
244
</element>
 
245
 
 
246
 
 
247
<element name="StrLen">
 
248
<short>Length of a null-terminated string.</short>
 
249
<descr>
 
250
Returns the length of the null-terminated string <var>P</var>.
 
251
</descr>
 
252
<errors>
 
253
None.
 
254
</errors>
 
255
<seealso>
 
256
<link id="StrNew"/>
 
257
</seealso>
 
258
<example file="stringex/ex1"/>
 
259
</element>
 
260
 
 
261
 
 
262
<element name="StrLIComp">
 
263
<short>Compare limited number of characters in 2 null-terminated strings,
 
264
ignoring case.</short>
 
265
<descr>
 
266
<p>
 
267
Compares maximum <var>L</var> characters of the null-terminated strings <var>S1</var> 
 
268
and <var>S2</var>, ignoring case.
 
269
The result is 
 
270
</p>
 
271
<ul>
 
272
<li> A negative <var>Longint</var> when <var>S1&lt;S2</var>.
 
273
</li>
 
274
<li> 0 when <var>S1=S2</var>.
 
275
</li>
 
276
<li> A positive <var>Longint</var> when <var>S1&gt;S2</var>.
 
277
</li>
 
278
</ul>
 
279
<p>
 
280
For an example, see <link id="StrIComp"/>
 
281
</p>
 
282
</descr>
 
283
<errors>
 
284
None.
 
285
</errors>
 
286
<seealso>
 
287
<link id="StrLComp"/>
 
288
<link id="StrComp"/>
 
289
<link id="StrIComp"/>
 
290
</seealso>
 
291
</element>
 
292
 
 
293
 
 
294
<element name="StrLower">
 
295
<short>Convert null-terminated string to all-lowercase.</short>
 
296
<descr>
 
297
Converts <var>P</var> to an all-lowercase string. Returns <var>P</var>.
 
298
</descr>
 
299
<errors>
 
300
None.
 
301
</errors>
 
302
<seealso>
 
303
<link id="StrUpper"/>
 
304
</seealso>
 
305
<example file="stringex/ex14"/>
 
306
</element>
 
307
 
 
308
 
 
309
<element name="StrMove">
 
310
<short>Move a null-terminated string to new location.</short>
 
311
<descr>
 
312
Copies <var>MaxLen</var> characters from <var>Source</var> to <var>Dest</var>. No
 
313
terminating null-character is copied.
 
314
Returns <var>Dest</var>
 
315
</descr>
 
316
<errors>
 
317
None.
 
318
</errors>
 
319
<seealso>
 
320
<link id="StrLCopy"/>
 
321
<link id="StrCopy"/>
 
322
</seealso>
 
323
<example file="stringex/ex10"/>
 
324
</element>
 
325
 
 
326
 
 
327
<element name="StrNew">
 
328
<short>Allocate room for new null-terminated string.</short>
 
329
<descr>
 
330
Copies <var>P</var> to the Heap, and returns a pointer to the copy.
 
331
</descr>
 
332
<errors>
 
333
Returns <var>Nil</var> if no memory was available for the copy.
 
334
</errors>
 
335
<seealso>
 
336
<link id="StrCopy"/>
 
337
<link id="StrDispose"/>
 
338
</seealso>
 
339
<example file="stringex/ex16"/>
 
340
</element>
 
341
 
 
342
<element name="StrPas">
 
343
<short>Convert a null-terminated string to a shortstring.</short>
 
344
<descr>
 
345
Converts a null terminated string in <var>P</var> to a Pascal string, and returns
 
346
this string. The string is truncated at 255 characters.
 
347
</descr>
 
348
<errors>
 
349
None.
 
350
</errors>
 
351
<seealso>
 
352
<link id="StrPCopy"/>
 
353
</seealso>
 
354
<example file="stringex/ex3"/>
 
355
</element>
 
356
 
 
357
 
 
358
<element name="StrPCopy">
 
359
<short>Copy a pascal string to a null-terminated string</short>
 
360
<descr>
 
361
Converts the Pascal string in <var>Source</var> to a Null-terminated 
 
362
string, and copies it to <var>Dest</var>. <var>Dest</var> needs enough room to contain
 
363
the string <var>Source</var>, i.e. <var>Length(Source)+1</var> bytes.
 
364
</descr>
 
365
<errors>
 
366
No length checking is performed.
 
367
</errors>
 
368
<seealso>
 
369
<link id="StrPas"/>
 
370
</seealso>
 
371
<example file="stringex/ex2"/>
 
372
</element>
 
373
 
 
374
 
 
375
<element name="StrPos">
 
376
<short>Search for a null-terminated substring in a null-terminated
 
377
string</short>
 
378
<descr>
 
379
Returns a pointer to the first occurrence of <var>S2</var> in <var>S1</var>.
 
380
If <var>S2</var> does not occur in <var>S1</var>, returns <var>Nil</var>.
 
381
</descr>
 
382
<errors>
 
383
None.
 
384
</errors>
 
385
<seealso>
 
386
<link id="StrScan"/>
 
387
<link id="StrRScan"/>
 
388
</seealso>
 
389
<example file="stringex/ex15"/>
 
390
</element>
 
391
 
 
392
<element name="StrRScan">
 
393
<short>Find last occurrence of a character in a null-terminated string.</short>
 
394
<descr>
 
395
<p>
 
396
Returns a pointer to the last occurrence of the character <var>C</var> in the
 
397
null-terminated string <var>P</var>. If <var>C</var> does not occur, returns
 
398
<var>Nil</var>.
 
399
</p>
 
400
<p>
 
401
For an example, see <link id="StrScan"/>.
 
402
</p>
 
403
</descr>
 
404
<errors>
 
405
None.
 
406
</errors>
 
407
<seealso>
 
408
<link id="StrScan"/>
 
409
<link id="StrPos"/>
 
410
</seealso>
 
411
</element>
 
412
 
 
413
 
 
414
 
 
415
 
 
416
<element name="StrScan">
 
417
<short>Find first occurrence of a character in a null-terminated string.</short>
 
418
<descr>
 
419
Returns a pointer to the first occurrence of the character <var>C</var> in the
 
420
null-terminated string <var>P</var>. If <var>C</var> does not occur, returns
 
421
<var>Nil</var>.
 
422
</descr>
 
423
<errors>
 
424
None.
 
425
</errors>
 
426
<seealso>
 
427
<link id="StrRScan"/>
 
428
<link id="StrPos"/>
 
429
</seealso>
 
430
<example file="stringex/ex13"/>
 
431
</element>
 
432
 
 
433
 
 
434
<element name="StrUpper">
 
435
<short>Convert null-terminated string to all-uppercase</short>
 
436
<descr>
 
437
<p>
 
438
Converts <var>P</var> to an all-uppercase string. Returns <var>P</var>.
 
439
</p>
 
440
<p>
 
441
For an example, see <link id="StrLower"/>
 
442
</p>
 
443
</descr>
 
444
<errors>
 
445
None.
 
446
</errors>
 
447
<seealso>
 
448
<link id="StrLower"/>
 
449
</seealso>
 
450
</element>
 
451
 
 
452
</module>
 
453
</package>
 
454
</fpdoc-descriptions>