From: tmoran@acm.org
Subject: Re: Optimising string handling in application
Date: Wed, 02 Apr 2003 04:10:59 GMT
Date: 2003-04-02T04:10:59+00:00 [thread overview]
Message-ID: <mptia.297625$3D1.163591@sccrnsc01> (raw)
In-Reply-To: 1049198066.356477@edh3
Does this (with its questions answered) do what you want?
function Replace_Callsign_In_Msg(Msg : in String;
New_Callsign : in String) return String is
Eq : constant Positive := Ada.Strings.Fixed.Index(Msg, "ME001=") + 5;
Semi : Natural;
begin
if Eq = 5 then
-- "ME001=" not present, what to do?
end if;
Semi := Ada.Strings.Fixed(Msg(Eq, ";");
if Semi = 0 then
-- following ';' missing, what to do?
end if;
return Msg(Msg'first .. Eq) & New_Callsign & Msg(Semi .. Msg'last);
end Replace_Callsign_In_Msg;
next prev parent reply other threads:[~2003-04-02 4:10 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2003-04-01 11:54 Optimising string handling in application Frode Tenneboe
2003-04-01 18:52 ` Jeffrey Carter
2003-04-02 3:17 ` Steve
2003-04-02 4:10 ` tmoran [this message]
2003-04-02 7:15 ` Frode Tenneboe
2003-04-02 18:23 ` tmoran
2003-04-04 10:13 ` Frode Tenneboe
2003-04-04 13:26 ` Preben Randhol
2003-04-04 14:42 ` Frode Tenneboe
2003-04-04 21:48 ` Warren W. Gay VE3WWG
2003-04-05 7:24 ` Pascal Obry
2003-04-04 14:08 ` Frank J. Lhota
2003-04-04 15:26 ` Robert Spooner
2003-04-04 21:49 ` Warren W. Gay VE3WWG
2003-04-04 17:43 ` tmoran
2003-04-04 21:42 ` Frode Tennebø
2003-04-02 19:03 ` tmoran
2003-04-04 10:44 ` Frode Tenneboe
2003-04-05 3:28 ` tmoran
2003-04-05 0:08 ` Jeffrey Carter
replies disabled
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox