RE: Question about STRINGs...
"Phil Malin" <[email protected]> Wed, 1 Jun 2005 09:59:06 +1000
| Newsgroups | gmane.comp.lang.eiffel.smalleiffel |
|---|---|
| Message-ID | <[email protected]> |
Hi Daniel. I currently use ARRAY[CHARACTER] for it but the problem is that most of the time I find that I want the result as a STRING, not simply an array of characters. Being able to write directly onto the string saves me from manually copying a (potentially large) chunk of data. Cheers. -----Original Message----- From: Daniel F Moisset [mailto:[email protected]] Sent: Tue 5/31/2005 10:51 PM To: SmartEiffel Mailing List Cc: Subject: Re: Question about STRINGs... On Tue, 2005-05-31 at 16:46 +1000, Phil Malin wrote: > Hi there. > or something so one can copy some arbitrary data pointed to by 'ptr' > in an efficient way (by having it use bcopy/memcpy/etc.)? I use NATIVE_ARRAY[CHARACTER] for that. Other possibility is allocating space into the STRING, and passing its pointer (to_external) to the C routines that do the reading (fread, memcpy, etc) D.