From: Stephen Leake <Stephen.Leake@gsfc.nasa.gov>
Subject: Re: String type conversions
Date: 1999/02/09
Date: 1999-02-09T00:00:00+00:00 [thread overview]
Message-ID: <ug18fdy9n.fsf@gsfc.nasa.gov> (raw)
In-Reply-To: 36C08E00.C3904670@Botton.com
David Botton <David@Botton.com> writes:
> What is the best way to convert back forth between:
>
> Wide_String to/from String
I'd define a map (Ada.Strings.Wide_Maps) to map non-ASCII characters
to ASCII.Nul or whatever might be appropriate, then write a loop to do
the actual copy from the map output character by character. Let the
compiler optimize the loop.
Or you can use Ada.Strings.Handling.To_Character in the loop, if you
don't need a full map.
> wchar_array to/from char_array
Convert to the Ada type, then proceed as above.
-- Stephe
next prev parent reply other threads:[~1999-02-09 0:00 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
1999-02-09 0:00 String type conversions David Botton
1999-02-09 0:00 ` Tucker Taft
1999-02-09 0:00 ` Stephen Leake [this message]
1999-02-09 0:00 ` Robert I. Eachus
1999-02-12 0:00 ` Nick Roberts
replies disabled
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox