Re: [Seqan-dev] conversion tà std::string
- From: Rahn, René <Rene.Rahn@fu-berlin.de>
- To: SeqAn Development <seqan-dev@lists.fu-berlin.de>
- Date: Wed, 21 Mar 2018 10:13:56 +0100
- Subject: Re: [Seqan-dev] conversion tà std::string
Hi Sacha,
our sequence containers do not offer implicit or explicit conversion to STL containers.
At least not that I am aware of.
Also the conversion by toCString does not imply a conversion to const char *.
It is merely a function to access the underlying data, like std::data, but with a kind of confusing naming.
In your case, you can simply call the range constructor of the std::string class:
std::string test1{begin(record.seq, Standard{}), end{record.seq, Standard{}}};
Also while doing this, you need to be sure, that whatever is stored in the seqan::String is also convertible to your target type. Converting a seqan alphabet to char implicitly is fine in SeqAn2.
But please be aware of the fact, that a seqan::String is more like a std::vector then the std::string.
I would also like to ask you to file an issue on our issue tracker:
https://github.com/seqan/seqan/issues in the future.
I hope this helps.
cheers,
René
---
René Rahn
Ph.D. Student (de.NBI - CIBI)
--------------------------------
Institute of Computer Science
Algorithmic Bioinformatics (ABI)
--------------------------------
Freie Universität Berlin
Takustraße 9
14195 Berlin
--------------------------------
|
- References:
- [Seqan-dev] conversion tà std::string
- From: labsquare <sacha@labsquare.org>
- [Seqan-dev] conversion tà std::string
-
seqan-dev - March 2018 - Archives indexes sorted by:
[ thread ] [ subject ] [ author ] [ date ] - Complete archive of the seqan-dev mailing list
- More info on this list...