comp.lang.ada
 help / color / mirror / Atom feed
From: tmoran@bix.com
Subject: Re: End of a string????
Date: 2000/10/10
Date: 2000-10-10T00:00:00+00:00	[thread overview]
Message-ID: <01JE5.301562$i5.4364763@news1.frmt1.sfba.home.com> (raw)
In-Reply-To: MPG.144cf9c2da936cef98968d@news.prodigy.net

>How can I find the end of string in ada?  Is there any special character
>at the end of line like C's \0?  Or is there any function to find the
>length of a string like Java's Mystring.length()?  I tried
>myString'length, but it just gives me the size of array.
  S : String(1 .. 5);
is an array of 5 Characters, ie, a 5 character long string, regardless
of the contents of S.  An ascii.nul has no special meaning to Ada.
  You may want to look at package Ada.Strings.Bounded (for variable length
with a fixed maximum, like C) or at Ada.Strings.Unbounded (for variable
length with additional space allocated as needed).




  parent reply	other threads:[~2000-10-10  0:00 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2000-10-10  0:00 End of a string???? Ryuji Yokoyama
2000-10-10  0:00 ` Ted Dennison
2000-10-10  0:00 ` tmoran [this message]
2000-10-13  0:00 ` Per Sandberg
2000-10-13  0:00   ` Wes Groleau
2000-10-13  0:00     ` David C. Hoos, Sr.
2000-10-14  0:00       ` Wes Groleau
replies disabled

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