From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-1.3 required=5.0 tests=BAYES_00,INVALID_MSGID autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,b1a601cc75c5fb67 X-Google-Attributes: gid103376,public From: Stephen Leake Subject: Re: String type conversions Date: 1999/02/09 Message-ID: #1/1 X-Deja-AN: 442576742 References: <36C08E00.C3904670@Botton.com> Organization: NASA Goddard Space Flight Center -- Greenbelt, Maryland USA Newsgroups: comp.lang.ada Date: 1999-02-09T00:00:00+00:00 List-Id: David Botton 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