| Example Program ModReverse Modifier example for reverse strings. File "modifier_modreverse.cpp"
1 | #include <iostream>
2 | #include <seqan/file.h>
3 | #include <seqan/modifier.h>
4 |
5 | using namespace std;
6 | using namespace seqan;
7 |
8 |
9 | int main ()
10 | {
11 | String<char> myString = "A man, a plan, a canal-Panama";
12 | ModifiedString< String<char>, ModReverse > myModifier(myString);
13 |
14 | cout << myString << endl;
15 | cout << myModifier << endl;
16 |
17 | infix(myString, 9, 9) = "master ";
18 |
19 | cout << myString << endl;
20 | cout << myModifier << endl;
21 |
22 | return 0;
23 | }
Output weese@tanne:~/seqan$ cd demos weese@tanne:~/seqan/demos$ make modifier_modreverse weese@tanne:~/seqan/demos$ ./modifier_modreverse A man, a plan, a canal-Panama amanaP-lanac a ,nalp a ,nam A A man, a master plan, a canal-Panama amanaP-lanac a ,nalp retsam a ,nam A weese@tanne:~/seqan/demos$ See ModifiedString, ModReverse, String SeqAn - Sequence Analysis Library - www.seqan.de