Link to home
Start Free TrialLog in
Avatar of MTindill
MTindill

asked on

How to use StrFmt in Borland C++ Builder

I've beent trying to format a postcode of the form B17 9BN as B017 9BN using StrFmt.
Could somebody show me how to do this with C++ Builder?

Regards
Mark Tindill
ASKER CERTIFIED SOLUTION
Avatar of RideOn
RideOn

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of RideOn
RideOn

if i'd be you, i would take sprintf
Avatar of MTindill

ASKER

Whatever works.
How do I use "sprintf" then to accomplish the above without having to specify each individual element a character array to match the format specifiers.
i.e sprintf(buffer, "%c0%c%c%c%c%c%c%c\0", <what-goes-here?>);
In what format is the postcode? Is it a string of individual characters?
Yes.
Has this been resolved or is more needed here?

Moondancer
Community Support Moderator @ Experts Exchange
Thanks RideOn. Profuse apologies for the "small" delay in awarding points.

Regards
mtindill