Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

source: downloads/boost_1_33_1/libs/algorithm/string/doc/quickref.xml @ 14

Last change on this file since 14 was 12, checked in by landauf, 18 years ago

added boost

File size: 29.5 KB
Line 
1<?xml version="1.0" encoding="utf-8"?>
2<!DOCTYPE library PUBLIC "-//Boost//DTD BoostBook XML V1.0//EN"
3"http://www.boost.org/tools/boostbook/dtd/boostbook.dtd">
4<section id="string_algo.quickref" last-revision="$Date: 2004/07/16 09:06:39 $">
5    <title>Quick Reference</title>
6
7    <using-namespace name="boost"/>
8    <using-namespace name="boost::algorithm"/>
9
10    <section>   
11        <title>Algorithms</title>
12       
13        <table>
14            <title>Case Conversion</title>
15            <tgroup cols="3" align="left">
16                <thead>
17                    <row>
18                        <entry>Algorithm name</entry>
19                        <entry>Description</entry>
20                        <entry>Functions</entry>
21                    </row>
22                </thead>
23                <tbody>
24                    <row>
25                        <entry><code>to_upper</code></entry>
26                        <entry>Convert a string to upper case</entry>
27                        <entry>
28                            <functionname>to_upper_copy()</functionname>
29                            <sbr/>
30                            <functionname>to_upper()</functionname>
31                        </entry>
32                    </row>
33                    <row>
34                        <entry><code>to_lower</code></entry>
35                        <entry>Convert a string to lower case</entry>
36                        <entry>
37                            <functionname>to_lower_copy()</functionname>
38                            <sbr/>
39                            <functionname>to_lower()</functionname>
40                        </entry>
41                    </row>
42                </tbody>
43            </tgroup>
44        </table>
45        <table>
46            <title>Trimming</title>
47            <tgroup cols="3" align="left">
48                <thead>
49                    <row>
50                        <entry>Algorithm name</entry>
51                        <entry>Description</entry>
52                        <entry>Functions</entry>
53                    </row>
54                </thead>
55                <tbody>
56                    <row>
57                        <entry><code>trim_left</code></entry>
58                        <entry>Remove leading spaces from a string</entry>
59                        <entry>
60                            <functionname>trim_left_copy_if()</functionname>
61                            <sbr/>
62                            <functionname>trim_left_if()</functionname>
63                            <sbr/>
64                            <functionname>trim_left_copy()</functionname>
65                            <sbr/>
66                            <functionname>trim_left()</functionname>
67                        </entry>
68                    </row>
69                    <row>
70                        <entry><code>trim_right</code></entry>
71                        <entry>Remove trailing spaces from a string</entry>
72                        <entry>
73                            <functionname>trim_right_copy_if()</functionname>
74                            <sbr/>
75                            <functionname>trim_right_if()</functionname>
76                            <sbr/>
77                            <functionname>trim_right_copy()</functionname>
78                            <sbr/>
79                            <functionname>trim_right()</functionname>
80                        </entry>
81                    </row>
82                    <row>
83                        <entry><code>trim</code></entry>
84                        <entry>Remove leading and trailing spaces from a string</entry>
85                        <entry>
86                            <functionname>trim_copy_if()</functionname>
87                            <sbr/>
88                            <functionname>trim_if()</functionname>
89                            <sbr/>
90                            <functionname>trim_copy()</functionname>
91                            <sbr/>
92                            <functionname>trim()</functionname>
93                        </entry>
94                    </row>
95 
96                </tbody>
97            </tgroup>
98        </table>
99        <table>
100            <title>Predicates</title>
101            <tgroup cols="3" align="left">
102                <thead>
103                    <row>
104                        <entry>Algorithm name</entry>
105                        <entry>Description</entry>
106                        <entry>Functions</entry>
107                    </row>
108                </thead>
109                <tbody>
110                    <row>
111                        <entry><code>starts_with</code></entry>
112                        <entry>Check if a string is a prefix of the other one</entry>
113                        <entry>
114                            <functionname>starts_with()</functionname>
115                            <sbr/>
116                            <functionname>istarts_with()</functionname>
117                        </entry>
118                    </row>
119                    <row>
120                        <entry><code>ends_with</code></entry>
121                        <entry>Check if a string is a suffix of the other one</entry>
122                        <entry>
123                            <functionname>ends_with()</functionname>
124                            <sbr/>
125                            <functionname>iends_with()</functionname>
126                        </entry>
127                    </row>
128                    <row>
129                        <entry><code>contains</code></entry>
130                        <entry>Check if a string is contained of the other one</entry>
131                        <entry>
132                            <functionname>contains()</functionname>
133                            <sbr/>
134                            <functionname>icontains()</functionname>
135                        </entry>
136                    </row>
137                    <row>
138                        <entry><code>equals</code></entry>
139                        <entry>Check if two strings are equal</entry>
140                        <entry>
141                            <functionname>equals()</functionname>
142                            <sbr/>
143                            <functionname>iequals()</functionname>
144                        </entry>
145                    </row>
146                    <row>
147                        <entry><code>all</code></entry>
148                        <entry>Check if all elements of a string satisfy the given predicate</entry>
149                        <entry>
150                            <functionname>all()</functionname>
151                        </entry>
152                    </row>
153                </tbody>
154            </tgroup>
155        </table>
156        <table>
157            <title>Find algorithms</title>
158            <tgroup cols="3" align="left">
159                <thead>
160                    <row>
161                        <entry>Algorithm name</entry>
162                        <entry>Description</entry>
163                        <entry>Functions</entry>
164                    </row>
165                </thead>
166                <tbody>
167                    <row>
168                        <entry>find_first</entry>
169                        <entry>Find the first occurrence of a string in the input</entry>
170                        <entry>
171                            <functionname>find_first()</functionname>
172                            <sbr/>
173                            <functionname>ifind_first()</functionname>
174                        </entry>
175                    </row>
176                    <row>
177                        <entry>find_last</entry>
178                        <entry>Find the last occurrence of a string in the input</entry>
179                        <entry>
180                            <functionname>find_last()</functionname>
181                            <sbr/>
182                            <functionname>ifind_last()</functionname>
183                        </entry>
184                    </row>
185                    <row>
186                        <entry>find_nth</entry>
187                        <entry>Find the nth (zero-indexed) occurrence of a string in the input</entry>
188                        <entry>
189                            <functionname>find_nth()</functionname>
190                            <sbr/>
191                            <functionname>ifind_nth()</functionname>
192                        </entry>
193                    </row>
194                    <row>
195                        <entry>find_head</entry>
196                        <entry>Retrieve the head of a string</entry>
197                        <entry>
198                            <functionname>find_head()</functionname>
199                        </entry>
200                    </row>                 
201                    <row>
202                        <entry>find_tail</entry>
203                        <entry>Retrieve the tail of a string</entry>
204                        <entry>
205                            <functionname>find_tail()</functionname>
206                        </entry>
207                    </row>
208                    <row>
209                        <entry>find_token</entry>
210                        <entry>Find first matching token in the string</entry>
211                        <entry>
212                            <functionname>find_token()</functionname>
213                        </entry>
214                    </row>                     
215                    <row>
216                        <entry>find_regex</entry>
217                        <entry>Use the regular expression to search the string</entry>
218                        <entry>
219                            <functionname>find_regex()</functionname>
220                        </entry>
221                    </row>                     
222                    <row>
223                        <entry>find</entry>
224                        <entry>Generic find algorithm</entry>
225                        <entry>
226                            <functionname>find()</functionname>
227                        </entry>
228                    </row>                     
229                </tbody>
230            </tgroup>
231        </table>
232        <table>
233            <title>Erase/Replace</title>
234            <tgroup cols="3" align="left">
235                <thead>
236                    <row>
237                        <entry>Algorithm name</entry>
238                        <entry>Description</entry>
239                        <entry>Functions</entry>
240                    </row>
241                </thead>
242                <tbody>
243                    <row>
244                        <entry>replace/erase_first</entry>
245                        <entry>Replace/Erase the first occurrence of a string in the input</entry>
246                        <entry>
247                            <functionname>replace_first()</functionname>
248                            <sbr/>
249                            <functionname>replace_first_copy()</functionname>
250                            <sbr/>
251                            <functionname>ireplace_first()</functionname>
252                            <sbr/>
253                            <functionname>ireplace_first_copy()</functionname>
254                            <sbr/>                     
255                            <functionname>erase_first()</functionname>
256                            <sbr/>
257                            <functionname>erase_first_copy()</functionname>
258                            <sbr/>
259                            <functionname>ierase_first()</functionname>
260                            <sbr/>
261                            <functionname>ierase_first_copy()</functionname>
262                        </entry>
263                    </row>
264                    <row>
265                        <entry>replace/erase_last</entry>
266                        <entry>Replace/Erase the last occurrence of a string in the input</entry>
267                        <entry>
268                            <functionname>replace_last()</functionname>
269                            <sbr/>
270                            <functionname>replace_last_copy()</functionname>
271                            <sbr/>
272                            <functionname>ireplace_last()</functionname>
273                            <sbr/>
274                            <functionname>ireplace_last_copy()</functionname>
275                            <sbr/>                     
276                            <functionname>erase_last()</functionname>
277                            <sbr/>
278                            <functionname>erase_last_copy()</functionname>
279                            <sbr/>
280                            <functionname>ierase_last()</functionname>
281                            <sbr/>
282                            <functionname>ierase_last_copy()</functionname>
283                        </entry>
284                    </row>
285                    <row>
286                        <entry>replace/erase_nth</entry>
287                        <entry>Replace/Erase the nth (zero-indexed) occurrence of a string in the input</entry>
288                        <entry>
289                            <functionname>replace_nth()</functionname>
290                            <sbr/>
291                            <functionname>replace_nth_copy()</functionname>
292                            <sbr/>
293                            <functionname>ireplace_nth()</functionname>
294                            <sbr/>
295                            <functionname>ireplace_nth_copy()</functionname>
296                            <sbr/>                     
297                            <functionname>erase_nth()</functionname>
298                            <sbr/>
299                            <functionname>erase_nth_copy()</functionname>
300                            <sbr/>
301                            <functionname>ierase_nth()</functionname>
302                            <sbr/>
303                            <functionname>ierase_nth_copy()</functionname>
304                        </entry>
305                    </row>
306                    <row>
307                        <entry>replace/erase_all</entry>
308                        <entry>Replace/Erase the all occurrences of a string in the input</entry>
309                        <entry>
310                            <functionname>replace_all()</functionname>
311                            <sbr/>
312                            <functionname>replace_all_copy()</functionname>
313                            <sbr/>
314                            <functionname>ireplace_all()</functionname>
315                            <sbr/>
316                            <functionname>ireplace_all_copy()</functionname>
317                            <sbr/>                     
318                            <functionname>erase_all()</functionname>
319                            <sbr/>
320                            <functionname>erase_all_copy()</functionname>
321                            <sbr/>
322                            <functionname>ierase_all()</functionname>
323                            <sbr/>
324                            <functionname>ierase_all_copy()</functionname>
325                        </entry>
326                    </row>
327                    <row>
328                        <entry>replace/erase_head</entry>
329                        <entry>Replace/Erase the head of the input</entry>
330                        <entry>
331                            <functionname>replace_head()</functionname>
332                            <sbr/>
333                            <functionname>replace_head_copy()</functionname>
334                            <sbr/>
335                            <functionname>erase_head()</functionname>
336                            <sbr/>
337                            <functionname>erase_head_copy()</functionname>
338                            <sbr/>
339                        </entry>
340                    </row>
341                    <row>
342                        <entry>replace/erase_tail</entry>
343                        <entry>Replace/Erase the tail of the input</entry>
344                        <entry>
345                            <functionname>replace_tail()</functionname>
346                            <sbr/>
347                            <functionname>replace_tail_copy()</functionname>
348                            <sbr/>
349                            <functionname>erase_tail()</functionname>
350                            <sbr/>
351                            <functionname>erase_tail_copy()</functionname>
352                            <sbr/>
353                        </entry>
354                    </row>
355                    <row>
356                        <entry>replace/erase_regex</entry>
357                        <entry>Replace/Erase a substring matching the given regular expression</entry>
358                        <entry>
359                            <functionname>replace_regex()</functionname>
360                            <sbr/>
361                            <functionname>replace_regex_copy()</functionname>
362                            <sbr/>
363                            <functionname>erase_regex()</functionname>
364                            <sbr/>
365                            <functionname>erase_regex_copy()</functionname>
366                            <sbr/>
367                        </entry>
368                    </row>
369                    <row>
370                        <entry>replace/erase_regex_all</entry>
371                        <entry>Replace/Erase all substrings matching the given regular expression</entry>
372                        <entry>
373                            <functionname>replace_all_regex()</functionname>
374                            <sbr/>
375                            <functionname>replace_all_regex_copy()</functionname>
376                            <sbr/>
377                            <functionname>erase_all_regex()</functionname>
378                            <sbr/>
379                            <functionname>erase_all_regex_copy()</functionname>
380                            <sbr/>
381                        </entry>
382                    </row>
383                    <row>
384                        <entry>find_format</entry>
385                        <entry>Generic replace algorithm</entry>
386                        <entry>
387                            <functionname>find_format()</functionname>
388                            <sbr/>
389                            <functionname>find_format_copy()</functionname>
390                            <sbr/>
391                            <functionname>find_format_all()</functionname>
392                            <sbr/>
393                            <functionname>find_format_all_copy()()</functionname>
394                        </entry>
395                    </row>
396                </tbody>
397            </tgroup>
398        </table>
399        <table>
400            <title>Split</title>
401            <tgroup cols="3" align="left">
402                <thead>
403                    <row>
404                        <entry>Algorithm name</entry>
405                        <entry>Description</entry>
406                        <entry>Functions</entry>
407                    </row>
408                </thead>
409                <tbody>
410                    <row>
411                        <entry>find_all</entry>
412                        <entry>Find/Extract all matching substrings in the input</entry>
413                        <entry>
414                            <functionname>find_all()</functionname>
415                            <sbr/>
416                            <functionname>ifind_all()</functionname>
417                            <sbr/>
418                            <functionname>find_all_regex()</functionname>
419                        </entry>
420                    </row>
421                        <row>
422                        <entry>split</entry>
423                        <entry>Split input into parts</entry>
424                        <entry>
425                            <functionname>split()</functionname>
426                            <sbr/>
427                            <functionname>split_regex()</functionname>
428                        </entry>
429                   </row>
430                </tbody>
431            </tgroup>
432        </table>
433    </section>
434    <section>
435        <title>Finders and Formatters</title>
436       
437        <table>
438            <title>Finders</title>
439            <tgroup cols="3" align="left">
440                <thead>
441                    <row>
442                        <entry>Finder</entry>
443                        <entry>Description</entry>
444                        <entry>Generators</entry>
445                    </row>
446                </thead>
447                <tbody>
448                    <row>
449                        <entry>first_finder</entry>
450                        <entry>Search for the first match of the string in an input</entry>
451                        <entry>
452                            <functionname>first_finder()</functionname>
453                        </entry>
454                    </row>
455                    <row>
456                        <entry>last_finder</entry>
457                        <entry>Search for the last match of the string in an input</entry>
458                        <entry>
459                            <functionname>last_finder()</functionname>
460                        </entry>
461                    </row>
462                    <row>
463                        <entry>nth_finder</entry>
464                        <entry>Search for the nth (zero-indexed) match of the string in an input</entry>
465                        <entry>
466                            <functionname>nth_finder()</functionname>
467                        </entry>
468                    </row>
469                    <row>
470                        <entry>head_finder</entry>
471                        <entry>Retrieve the head of an input</entry>
472                        <entry>
473                            <functionname>head_finder()</functionname>
474                        </entry>
475                    </row>
476                    <row>
477                        <entry>tail_finder</entry>
478                        <entry>Retrieve the tail of an input</entry>
479                        <entry>
480                            <functionname>tail_finder()</functionname>
481                        </entry>
482                    </row>
483                    <row>
484                        <entry>token_finder</entry>
485                        <entry>Search for a matching token in an input</entry>
486                        <entry>
487                            <functionname>token_finder()</functionname>
488                        </entry>
489                    </row>
490                    <row>
491                        <entry>range_finder</entry>
492                        <entry>Do no search, always returns the given range</entry>
493                        <entry>
494                            <functionname>range_finder()</functionname>
495                        </entry>
496                    </row>
497                    <row>
498                        <entry>regex_finder</entry>
499                        <entry>Search for a substring matching the given regex</entry>
500                        <entry>
501                            <functionname>regex_finder()</functionname>
502                        </entry>
503                    </row>
504                </tbody>
505            </tgroup>
506        </table>
507
508        <table>
509            <title>Formatters</title>
510            <tgroup cols="3" align="left">
511                <thead>
512                    <row>
513                        <entry>Formatter</entry>
514                        <entry>Description</entry>
515                        <entry>Generators</entry>
516                    </row>
517                </thead>
518                <tbody>
519                    <row>
520                        <entry>const_formatter</entry>
521                        <entry>Constant formatter. Always return the specified string</entry>
522                        <entry>
523                            <functionname>const_formatter()</functionname>
524                        </entry>                                               
525                    </row>
526                    <row>
527                        <entry>identity_formatter</entry>
528                        <entry>Identity formatter. Return unmodified input input</entry>
529                        <entry>
530                            <functionname>identity_formatter()</functionname>
531                        </entry>
532                    </row>
533                    <row>
534                        <entry>empty_formatter</entry>
535                        <entry>Null formatter. Always return an empty string</entry>
536                        <entry>
537                            <functionname>empty_formatter()</functionname>
538                        </entry>
539                    </row>
540                    <row>
541                        <entry>regex_formatter</entry>
542                        <entry>Regex formatter. Format regex match using the specification in the format string</entry>
543                        <entry>
544                            <functionname>regex_formatter()</functionname>
545                        </entry>
546                    </row>
547                </tbody>
548            </tgroup>
549        </table>
550    </section>
551    <section>
552        <title>Iterators</title>
553       
554        <table>
555            <title>Find Iterators</title>
556            <tgroup cols="3" align="left">
557                <thead>
558                    <row>
559                        <entry>Iterator name</entry>
560                        <entry>Description</entry>
561                        <entry>Iterator class</entry>
562                    </row>
563                </thead>
564                <tbody>
565                    <row>
566                        <entry>find_iterator</entry>
567                        <entry>Iterates through matching substrings in the input</entry>
568                        <entry>
569                            <classname>find_iterator</classname>
570                        </entry>
571                    </row>
572                    <row>
573                        <entry>split_iterator</entry>
574                        <entry>Iterates through gaps between matching substrings in the input</entry>
575                        <entry>
576                            <classname>split_iterator</classname>
577                        </entry>
578                    </row>             
579                </tbody>
580            </tgroup>
581        </table>
582    </section>
583   
584    <section>
585        <title>Classification</title>
586       
587        <table>
588            <title>Predicates</title>
589            <tgroup cols="3" align="left">
590                <thead>
591                    <row>
592                        <entry>Predicate name</entry>
593                        <entry>Description</entry>
594                        <entry>Generator</entry>
595                    </row>
596                </thead>
597                <tbody>
598                    <row>
599                        <entry>is_classified</entry>
600                        <entry>Generic <code>ctype</code> mask based classification</entry>
601                        <entry>
602                            <functionname>is_classified()</functionname>
603                        </entry>
604                    </row>
605                    <row>
606                        <entry>is_space</entry>
607                        <entry>Recognize spaces</entry>
608                        <entry>
609                            <functionname>is_space()</functionname>
610                        </entry>
611                    </row>
612                    <row>
613                        <entry>is_alnum</entry>
614                        <entry>Recognize alphanumeric characters</entry>
615                        <entry>
616                            <functionname>is_alnum()</functionname>
617                        </entry>
618                    </row>
619                    <row>
620                        <entry>is_alpha</entry>
621                        <entry>Recognize letters</entry>
622                        <entry>
623                            <functionname>is_alpha()</functionname>
624                        </entry>
625                    </row>
626                    <row>
627                        <entry>is_cntrl</entry>
628                        <entry>Recognize control characters</entry>
629                        <entry>
630                            <functionname>is_cntrl()</functionname>
631                        </entry>
632                    </row>
633                    <row>
634                        <entry>is_digit</entry>
635                        <entry>Recognize decimal digits</entry>
636                        <entry>
637                            <functionname>is_digit()</functionname>
638                        </entry>
639                    </row>
640                    <row>
641                        <entry>is_graph</entry>
642                        <entry>Recognize graphical characters</entry>
643                        <entry>
644                            <functionname>is_graph()</functionname>
645                        </entry>
646                    </row>
647                    <row>
648                        <entry>is_lower</entry>
649                        <entry>Recognize lower case characters</entry>
650                        <entry>
651                            <functionname>is_lower()</functionname>
652                        </entry>
653                    </row>
654                    <row>
655                        <entry>is_print</entry>
656                        <entry>Recognize printable characters</entry>
657                        <entry>
658                            <functionname>is_print()</functionname>
659                        </entry>
660                    </row>
661                    <row>
662                        <entry>is_punct</entry>
663                        <entry>Recognize punctuation characters</entry>
664                        <entry>
665                            <functionname>is_punct()</functionname>
666                        </entry>
667                    </row>
668                    <row>
669                        <entry>is_upper</entry>
670                        <entry>Recognize uppercase characters</entry>
671                        <entry>
672                            <functionname>is_upper()</functionname>
673                        </entry>
674                    </row>
675                    <row>
676                        <entry>is_xdigit</entry>
677                        <entry>Recognize hexadecimal digits</entry>
678                        <entry>
679                            <functionname>is_xdigit()</functionname>
680                        </entry>
681                    </row>
682                </tbody>
683            </tgroup>
684        </table>
685    </section>
686</section>
Note: See TracBrowser for help on using the repository browser.