This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
[libstdc++] Transforming a string to a primary sort key
- From: Tim Shen <timshen91 at gmail dot com>
- To: libc-alpha at sourceware dot org
- Cc: Paolo Carlini <paolo dot carlini at oracle dot com>, roland at gnu dot org
- Date: Fri, 28 Mar 2014 12:27:16 -0400
- Subject: [libstdc++] Transforming a string to a primary sort key
- Authentication-results: sourceware.org; auth=none
Hi there, I'm a libstdc++ developer, contributing C++11 <regex> part.
C++ standard <regex> specifies a function
`regex_traits::transform_primary()` that takes a string, then converts
it to a "primary sort key". However, the standard doesn't specify any
interface to do the actual conversion.
For example, for input "AÀÁÂÃÄÅaàáâãäå" under locale "en_US.UTF-8",
the output could be, but not necessarily, "aaaaaaaaaaaaaa".
Can I get any idea about implementing that function?
Thank you!
--
Regards,
Tim Shen