From: Mihalca Bobby (bobbymihalca_at_[hidden])
Date: 2005-04-21 06:20:35
I cant claim that I invented string conversion, however I didnt seen your code before you pointed it.
If you look closer you will see this resembles very well with some code in boost::regex and for codecvt just look at Strustrops chapter 3 on locales.
The name is string_cast because seems to me a good and natural name.
The fact that other peoples wrote similar things and previous topics on the subject proves that something like this is needed.
My code is public domain and can be used by anyone who find it useful, I can only hope it will make it to boost library.
Note that is a bug I have to fix. The size of returned string is the size of the old string and this is not always true. Example: L\r\n is 1 char ( I think ) while when converting to ascii needs to be 2 chars.
prez_at_[hidden] wrote: On Wed, 20 Apr 2005 09:29:27 -0700, Mihalca Bobby wrote:
> I needed some std::string <-> std::wstring conversion and after
> Here is the code:
<-- SNIP -->
Surprisingly, it looks like the code I wrote for Mantra (though I did
use the code below to write it), look here:
It is also contained as a function (or series of functions) called
I guess there really are only so many ways to skin a cat ;)
-- PreZ :) Founder. The Neuromancy Society (http://www.neuromancy.net) __________________________________________________ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk