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,decb0c44a2cbd5dc X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2002-02-01 07:56:36 PST Path: archiver1.google.com!news1.google.com!newsfeed.stanford.edu!canoe.uoregon.edu!hammer.uoregon.edu!skates!not-for-mail From: Stephen Leake Newsgroups: comp.lang.ada Subject: Re: How to delete charcters in a string? Date: 01 Feb 2002 10:56:17 -0500 Organization: NASA Goddard Space Flight Center Message-ID: References: <4519e058.0201310647.3637d7a9@posting.google.com> NNTP-Posting-Host: anarres.gsfc.nasa.gov Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: skates.gsfc.nasa.gov 1012579224 2197 128.183.220.71 (1 Feb 2002 16:00:24 GMT) X-Complaints-To: dscoggin@cne-odin.gsfc.nasa.gov NNTP-Posting-Date: 1 Feb 2002 16:00:24 GMT User-Agent: Gnus/5.0808 (Gnus v5.8.8) Emacs/20.7 Xref: archiver1.google.com comp.lang.ada:19482 Date: 2002-02-01T16:00:24+00:00 List-Id: tmoran@acm.org writes: > >the techniques you may have learned for dealing with dynamic C > >strings are liable to be completely inappropriate for dealing with > >fixed Ada strings. > How would you delete a character from a C string? Seems to me that's > probably harder that with an Ada string (lack of slice assignment), char *S1 = "ABCDEF"; strncpy (S1 + 3, S1 + 4, 3); result in *S1 is "ABDEF". No where near as pretty or readable as Ada, but just as short and easy. And I've probably got the "src" and "dest" parameters swapped. Man, I hate C :). -- -- Stephe