comp.lang.ada
 help / color / mirror / Atom feed
From: dale <dale@cs.rmit.edu.au>
Subject: Re: How to delete charcters in a string?
Date: Wed, 30 Jan 2002 14:22:46 +1100
Date: 2002-01-30T14:22:46+11:00	[thread overview]
Message-ID: <dale-DEEA66.14224630012002@news.rmit.edu.au> (raw)
In-Reply-To: mailman.1012350362.32618.comp.lang.ada@ada.eu.org

comp.lang.ada@ada.eu.org wrote:

> hi
> (im new to ada by the way)
> 
> well supose there is a character in a string which i do not want to be 
> seen 
> in the output.  i don't want to change it to anouther character but 
> delete 
> it completely.


You can't remove characters from a string. This sounds like a 
limitation, but it is simply asking too much from the "String" type.


Ways around this problem are...

   Construct a brand new string. E.g.

      New_String : String := Old_String (1..4) & Old_String (5..Last);

   You can't however do...

      Old_String := Old_String (1..4) & Old_String (5..Last);



   Use a different type,such as...

      Ada.Strings.Unbounded.Unbounded_String
 

Dale
------------ And now a word from our sponsor ------------------
Do your users want the best web-email gateway? Don't let your
customers drift off to free webmail services install your own
web gateway!
--  See http://netwinsite.com/sponsor/sponsor_webmail.htm  ----



  parent reply	other threads:[~2002-01-30  3:22 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 [this message]
2002-01-30  6:37   ` tmoran
2002-01-30  7:49     ` Dale Stanbrough
2002-01-30 15:04       ` Marin David Condic
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