-
Notifications
You must be signed in to change notification settings - Fork 82
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[FEATURE] cigar.assign_string from char pointers.
- Loading branch information
1 parent
e5c63f9
commit 5194a37
Showing
2 changed files
with
45 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
#include <seqan3/alphabet/cigar/cigar.hpp> | ||
#include <seqan3/core/debug_stream.hpp> | ||
|
||
int main() | ||
{ | ||
std::string cigar_str{"4S134M"}; | ||
|
||
seqan3::cigar letter1{}; | ||
seqan3::cigar letter2{}; | ||
|
||
letter1.assign_string(cigar_str.data(), cigar_str.data() + 2); | ||
letter2.assign_string(cigar_str.data() + 3, cigar_str.data() + cigar_str.size()); | ||
|
||
seqan3::debug_stream << letter1 << '\n'; // prints 134M | ||
seqan3::debug_stream << letter2 << '\n'; // prints 134M | ||
} |