Example Program
ModView
How to modify strings with a per-character functor.
Remarks
Take a look at the file seqan/modifier/modifier_functors.h to see what functors are already part of SeqAn.
File "modifier_modview.cpp"
A tutorial about the use of a user-defined modifier.
| 1 | |
| 2 | |
| 3 | |
| 4 | |
| 5 | |
| 6 |
A user-defined modifier that transforms all characters to upper case.
| 7 | |
| 8 | |
| 9 | |
| 10 | |
| 11 | |
| 12 | |
| 13 | |
| 14 | |
| 15 | |
| 16 | |
| 17 | |
| 18 |
The modifier is applied to a string.
| 19 | |
| 20 | |
| 21 | |
| 22 | |
| 23 | |
| 24 | |
| 25 | |
| 26 | |
| 27 | |
| 28 | |
| 29 |
Output
weese@tanne:~/seqan/demos$ make modifier_modview
weese@tanne:~/seqan/demos$ ./modifier_modview
A man, a plan, a canal-Panama
A MAN, A PLAN, A CANAL-PANAMA
A man, a master plan, a canal-Panama
A MAN, A MASTER PLAN, A CANAL-PANAMA
weese@tanne:~/seqan/demos$
See
SeqAn - Sequence Analysis Library - www.seqan.de