Text in D article

Bill Baxter dnewsgroup at billbaxter.com
Sat Nov 18 08:06:08 PST 2006


Max Samuha wrote:
> On Sat, 18 Nov 2006 15:59:33 +0100, Alexander Panek
> <a.panek at brainsware.org> wrote:
> 
>> PDF would be great, too.
>>
>> Tydr Schnubbis wrote:
>>> Daniel Keep wrote:
>>>> Here's a draft of an article which, hopefully, will explain some of the
>>>> details of how text in D works.  Any constructive criticism is welcomed,
>>>> along with edits or corrections.
>>>>
>>> Any chance of an .rtf, .doc, or even .txt? :)
> For those who is still on Windows :), thiere is a free and compact doc
> viewer that supports the open office format
> http://www.officeviewers.com/ 

Thanks for the link, Max.

Daniel, I like it.  Seems quite clear to me.

One minor thing.  In one section you recommend just using dchar[] 
everywhere as a solution for not slicing characters in the middle.  But 
then in the next section you recommend using std.string as a 
comprehensive solution for manipulating strings.  Unfortunately 
std.string really only deals with char[] strings.  So you might want to 
point out explicitly the dilemma that poses to the developer:  If you go 
with dchar[] and have to do a lot of string munging, you're likely to 
find lots of toUTF8's and toUCS32's popping up in your code.  If you go 
with char[] you've got to remember that mystring[1..$] may not mean what 
you think it means.

--bb



More information about the Digitalmars-d mailing list