On Fri, Oct 31, 2014 at 12:17:00AM +0000, Samuel Pike via Digitalmars-d-learn wrote: > Hi all. > > First time posting here. I recently downloaded the dmd compiler and > started making a few exercises with the language. Nice language > features but still somewhat confused with the library. > > If I use byDchar() over a "string" is there a possibility to get part > of a character or is guaranteed that the entire visual character will > be in the dchar? [...]
A dchar corresponds with a Unicode code point, but that doesn't always correspond with a "visual character" (e.g., if you have a base character followed by a combining diacritic, they would come out as two dchars). The Unicode term for "visual character" is "grapheme". If you want to process the string by grapheme, use byGrapheme() from std.uni. T -- EMACS = Extremely Massive And Cumbersome System