comp.lang.ada
 help / color / mirror / Atom feed
From: "Marin David Condic" <dont.bother.mcondic.auntie.spam@[acm.org>
Subject: Re: How to delete charcters in a string?
Date: Wed, 30 Jan 2002 10:04:06 -0500
Date: 2002-01-30T15:04:08+00:00	[thread overview]
Message-ID: <a39218$lvn$1@nh.pace.co.uk> (raw)
In-Reply-To: dstanbro-836472.18481830012002@mec2.bigpond.net.au

It seems like if all that is wanted is to get rid of some character
contained in the string without actually decreasing the size of the string
(just back padding with spaces or nulls or whatever...) then the best thing
to do is use the package Ada.Strings.Fixed. From my quick review of it you
have:

Move
Replace_Slice
Overwrite
Delete

All of which could be used to remove a particular character. Does that
address the original concern or was there a requirement to remove the array
position as well? (No need to build the proverbial "Brick Outhouse" if this
addresses the needs of an Ada newbie, eh? :-)

MDC
--
Marin David Condic
Senior Software Engineer
Pace Micro Technology Americas    www.pacemicro.com
Enabling the digital revolution
e-Mail:    marin.condic@pacemicro.com
Web:      http://www.mcondic.com/


"Dale Stanbrough" <dstanbro@bigpond.net.au> wrote in message
news:dstanbro-836472.18481830012002@mec2.bigpond.net.au...
> tmoran@acm.org wrote:
>
>
> Yes you can do that, but then you are -not- deleting characters
> from a string, you are deleting characters from a variable
> length string abstraction which is contained in two variables
> (Old_String, Last). This is essentially what Ada.Strings.Bounded
> does of course.
>






  reply	other threads:[~2002-01-30 15:04 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-01-30  0:25 How to delete charcters in a string? Anthony Wise
2002-01-30  2:44 ` Steve Doiel
2002-01-30  3:22 ` dale
2002-01-30  6:37   ` tmoran
2002-01-30  7:49     ` Dale Stanbrough
2002-01-30 15:04       ` Marin David Condic [this message]
2002-01-30 11:21 ` Preben Randhol
2002-01-30 15:15   ` Marin David Condic
2002-01-31 14:47 ` Ted Dennison
2002-01-31 16:08   ` Larry Hazel
2002-02-01 15:59     ` Ted Dennison
2002-02-01 17:05     ` Darren New
2002-02-01  6:14   ` tmoran
2002-02-01 15:56     ` Stephen Leake
2002-02-01 17:53       ` Pascal Obry
2002-02-18  3:48         ` David Thompson
2002-02-18 19:44           ` Stephen Leake
     [not found] <F207EAsx2Pwf500RR1h00019d09@hotmail.com>
2002-01-30  1:16 ` Eric Merritt
2002-01-30  1:16 ` Eric Merritt
replies disabled

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox