Boost logo

Boost Users :

From: Jeff Garland (jeff_at_[hidden])
Date: 2006-04-10 10:06:39


Paul Giaccone wrote:
> Lynn Allan wrote:
>
>> I've been puzzled about doing the equivalent of:
>> printf("%.5s\n", myBuf10);
>> and also:
>> printf("%.*s\n", 5, myBuf10);
>> Note: newbie with std::string ... using Microsoft vc7.1 compiler
>>
>> Thanks.
>>
>>
>
> string isn't a Boost library. You're unlikely to get any help here. Try
> posting to comp.lang.c++ on Google Groups.

Ture, but format is a Boost library. You might have a look at:

http://www.boost.org/libs/format/doc/format.html

You can use format with a std::stringstream and then extract an std::string.

Jeff


Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net