[prev in list] [next in list] [prev in thread] [next in thread]
List: boost
Subject: Re: [boost] [string] Realistic API proposal
From: Artyom <artyomtnk () yahoo ! com>
Date: 2011-01-31 9:22:49
Message-ID: 497767.98766.qm () web36703 ! mail ! mud ! yahoo ! com
[Download RAW message or body]
> From: Mathias Gaunard <mathias.gaunard@ens-lyon.org>
> Subject: Re: [boost] [string] Realistic API proposal
>
> On 30/01/2011 08:46, Artyom wrote:
> >>
> >> If my strings are valid and normalized, I can compare them with a simple
> >> binary-level comparison;
> >> likewise for substring search, where I may also need to add a boundary
>check
> >> if I want fine-grain search.
> >>
> >
> > No you can't
> >
> > For example when you search word שלום you want to find שָלוֹם as well (with
> > diactrics)
> > that are not normalized.
>
> Unless I understand that wrong, they're as equal as e is equal to é or a
> is equal to .
>
Yes, with small exception that "שָ" is NFC form that consists of two code points
for "base latter" and "vowel mark" which should be equal to "ש" the "base
letter",
unlike " " which has one code point in NFC form like "a".
>
> >
> > Search and Collation require much more complicated levels comparison.
>
> Right, I'm talking about exact comparison, not collation.
> Exact comparison is what you use in most text processing and parsing.
>
> You can perform collation folding with the right level if you want those
> two strings to compare equal.
>
>
> >
> > The problem that I may want 00e0 ( ) and 0061 0300 (a + `) and 0061 (a) to
>be
> > equal for string
> > search as well.
>
> You may, but that should not be the default behaviour of operator== and
> operator<.
>
The default behavior is binary comparison, but this is not what I'm
looking for I'm looking for search/comparison algorithm that can
see " " and "a" and "שָ" and "ש" as equal.
Artyom
_______________________________________________
Unsubscribe & other changes: http://lists.boost.org/mailman/listinfo.cgi/boost
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic