Text in D article (4th revision)

Daniel Keep daniel.keep.lists at gmail.com
Sat Nov 18 23:56:59 PST 2006


Daniel Keep wrote:
> Ok, here's the third revision.  Includes some clearer examples, a Q&A
> section, and is now written in plain text, and then dumped out to HTML.
>  If anyone complains about what file format it's in now, they can get
> stuffed :P  (And *yes*, the HTML is generated directly from the .txt file.)
> 
> Again, all feedback and suggestions is welcome.
> 
> 	-- Daniel

I finally managed to find a copy of the C99 standard, and I've filled in
what characters you can use... although it's still a bit tricky to
understand.  That said, I added an example which shows using function
names written entirely in hiragana, so it obviously works :P

Secondly, I've removed the references to std.utf.stride.  After going
over the docs again, and actually *testing* the code, it turns out I was
dead wrong on what stride does: it returns the length of the code point
sequence at the given location, not the number of code points from that
location.  Whoopsie.

I've replaced the code showing how to use std.utf.stride with a small
function that correctly computes the number of code points in a string.

	-- Daniel

-- 
Unlike Knuth, I have neither proven or tried the above; it may not even
make sense.

v2sw5+8Yhw5ln4+5pr6OFPma8u6+7Lw4Tm6+7l6+7D
i28a2Xs3MSr2e4/6+7t4TNSMb6HTOp5en5g6RAHCP  http://hackerkey.com/
-------------- next part --------------
A non-text attachment was scrubbed...
Name: text-in-d.zip
Type: application/octet-stream
Size: 19923 bytes
Desc: not available
URL: <http://lists.puremagic.com/pipermail/digitalmars-d/attachments/20061119/034388c8/attachment.obj>


More information about the Digitalmars-d mailing list