Proposal for fixing dchar ranges
    Steven Schveighoffer 
    schveiguy at yahoo.com
       
    Mon Mar 10 13:12:48 PDT 2014
    
    
  
On Mon, 10 Mar 2014 16:06:25 -0400, Steven Schveighoffer  
<schveiguy at yahoo.com> wrote:
> Think of an index as a position that has no real meaning except they are  
> ordered in the stream. Like a set of ordered numbers, not necessarily  
> consecutive. The index 4 may not exist, while 5 does.
I said that wrong, of course it has meaning. What I mean is that if you  
have two positions, the ordering will indicate where the  
characters/graphemes/code points occur in the stream, but their value will  
not be indicative of how far they are apart in terms of  
characters/graphemes/code points.
In other words, if I have two characters, at position p1 and p2, then
p1 > p2 => p1 comes later in the string than p2
p1 == p2 => p1 and p2 refer to the same character
p1 - p2 => not defined to any particular value.
-Steve
    
    
More information about the Digitalmars-d
mailing list