From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00 autolearn=ham autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,1cf653444208df72 X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2001-10-08 08:07:09 PST Path: archiver1.google.com!news1.google.com!newsfeed.stanford.edu!news-spur1.maxwell.syr.edu!news.maxwell.syr.edu!cyclone2.usenetserver.com!usenetserver.com!news01.optonline.net!news02.optonline.net.POSTED!not-for-mail From: "Mike Mohr" Newsgroups: comp.lang.ada References: <9pgr68$7pu1@news.cis.okstate.edu> <9phnic$9g5$1@nh.pace.co.uk> <5fkv7.134136$w7.19988807@news02.optonline.net> Subject: Re: ada vs. cpp X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 6.00.2600.0000 X-MIMEOLE: Produced By Microsoft MimeOLE V6.00.2600.0000 Message-ID: Date: Mon, 08 Oct 2001 15:07:05 GMT NNTP-Posting-Host: 24.188.177.13 X-Trace: news02.optonline.net 1002553625 24.188.177.13 (Mon, 08 Oct 2001 11:07:05 EDT) NNTP-Posting-Date: Mon, 08 Oct 2001 11:07:05 EDT Organization: Optimum Online Xref: archiver1.google.com comp.lang.ada:13930 Date: 2001-10-08T15:07:05+00:00 List-Id: I have just noticed in my attempt to mirror your second example of readable Ada I missed the fact that you swapped the position of the front and back of the source string, to get the correct result do this. const string V2 = V1.substr(5, 7) + "-" + V1.substr(0,4);