Download Reference Manual
The Developer's Library for D
About Wiki Forums Source Search Contact

Ticket #723 (assigned enhancement)

Opened 10 months ago

Last modified 2 months ago

Add single-character toUpper/toLower/toFold to tango.text.Unicode

Reported by: JarrettBillingsley Assigned to: ptriller (accepted)
Priority: normal Milestone: 0.99.8
Component: Tango Version: 0.99.2 Don
Keywords: triage Cc: JarrettBillingsley

Description

Would be nice to have them. Currently I have to do something like

dchar[1] buf;
dchar lower = toLower([origChar], buf)[0];

Change History

11/01/07 23:12:27 changed by JarrettBillingsley

  • cc set to JarrettBillingsley.

11/02/07 01:54:59 changed by kris

there's this problem where the upper- or lower-case of a character can actually be an array of them, instead of just one. So there's still that to deal with ...

11/02/07 15:27:12 changed by JarrettBillingsley

Ooh, scary. Course, dchar > dchar isn't an issue. But maybe for the others, you could pass in a wchar[2] or char[4] and it'd return a slice.

11/02/07 16:15:43 changed by kris

for uppercase of a single dchar, the result can be multiple dchars. Weird, I know :)

(follow-up: ↓ 7 ) 11/02/07 23:33:17 changed by kris

  • owner changed from kris to ptriller.
  • milestone set to 0.99.4.

12/16/07 14:51:40 changed by kris

ping Peter ... hope the ticket notification is working again

(in reply to: ↑ 5 ) 12/16/07 16:13:35 changed by ptriller

  • status changed from new to assigned.

Replying to kris: Unicode has actually two kinds of mapping the "complete" and the "simple" I could add methods for simple mapping, too.

Then a

   dchar toUpper(dchar ch);

would be possible.

I'll look into it.

(in reply to: ↑ description ) 12/16/07 17:54:38 changed by ptriller

I will add simpleToUpper simpleToLower and simpleToFold functions that use the simple Unicode Mapping that doesn't change the size.

I'll try to fix it in time for the 99.4 release. Although I cant promise

12/21/07 09:12:10 changed by larsivi

  • milestone changed from 0.99.4 to 0.99.5.

03/04/08 04:22:17 changed by Jim Panic

  • milestone changed from 0.99.5 to 0.99.6.

04/27/08 05:18:06 changed by larsivi

  • milestone changed from 0.99.6 to 0.99.7.

05/24/08 14:51:59 changed by larsivi

  • keywords set to triage.

07/10/08 06:56:41 changed by larsivi

  • milestone changed from 0.99.7 to 0.99.8.