At 12:00am -0700 00-09-08, Palm Developer Forum digest wrote:
>Subject: GetCharCaselessValue
>From: "Gordon, Douglas" <[EMAIL PROTECTED]>
>Date: Thu, 7 Sep 2000 07:55:32 -0400
>X-Message-Number: 5
>
>The PalmOS routines StrCompare and StrCaselessCompare work by using tables
>that are indexed by the value of a single character (i.e., 0-255). This is
>so they can work correctly for "accented" and other special characters that
>are outside of the A-z value range. For example, StrCaselessCompare calls
>GetCharCaselessValue to get a pointer to this array of UInt8 values.
>
>In my program, I need to get access to these values so that I can do
>efficient searching; for various reasons, I can't just call the standard
>StrCaselessCompare function and get things to work right. So, I'd like to
>call GetCharCaselessValue (or GetCharSortValue) and access the array
>directly, even though this is not a publicly documented API function.
>
>Is this a good idea, or am I leaving myself open for trouble? Another
>possibility is to duplicate the table(s) in my own code, although this adds
>256 bytes per table to my program.
1. It won't work with non-Latin devices such as Japanese.
2. In the future, TxtFindString (and FindStrInStr) will behave
differently based on the device's locale - e.g. German searching is
not the same as English searching. So if you'd want your search code
to act the same, then you couldn't rely on the GetCharCaselessValue
table.
What's the problem with using TxtFindString for searching?
-- Ken
Ken Krugler
TransPac Software, Inc.
<http://www.transpac.com>
+1 530-470-9200
--
For information on using the Palm Developer Forums, or to unsubscribe, please see
http://www.palmos.com/dev/tech/support/forums/