Closed
Bug 75551
Opened 25 years ago
Closed 25 years ago
[API] need a case INSENSITIVE way to search an nsAReadableString
Categories
(Core :: XPCOM, defect, P1)
Core
XPCOM
Tracking
()
RESOLVED
FIXED
mozilla0.9.1
People
(Reporter: mjudge, Assigned: scc)
References
Details
Attachments
(1 file)
this is blocking the editor right now, the only way around this for now is to
copy the string to an nsString and use the nsString methods. We need a helper
function that can accept some iterators and return usual compare result for
ASCII text compares.
| Assignee | ||
Comment 1•25 years ago
|
||
case insensitive search, case insensitive compare; this is an encoding issue,
api issue, and related to work I want to do on string `alogorithms', that is,
more functions like |copy_string| that take one or more strings and iterate over
them applying the caller-supplied visitor to each hunk, and testing for completion
| Assignee | ||
Comment 2•25 years ago
|
||
It's unlikely I'll have a bug free version for you by tree-closure tonight, but
I'll bust my butt to try to give it to you. Based on conversations with you and
others on IRC, I'm calling this my most important 0.9 bug. We should
communicate this fact to drivers to help get it in after the fact if we miss
tonights deadline.
Priority: -- → P1
Target Milestone: mozilla1.0 → mozilla0.9
| Assignee | ||
Comment 3•25 years ago
|
||
These are the 0.9 bugs that didn't make it, and that I intend to fix in 0.9.1
Target Milestone: mozilla0.9 → mozilla0.9.1
Blocks: 77460
| Assignee | ||
Updated•25 years ago
|
Summary: need a case INSENSITIVE way to search an nsAReadableString → [API] need a case INSENSITIVE way to search an nsAReadableString
| Assignee | ||
Comment 4•25 years ago
|
||
re-targeting milestones, starting from a clean slate
Target Milestone: mozilla0.9.1 → ---
| Assignee | ||
Comment 5•25 years ago
|
||
marking the functionality blockers for immediate attention in mozilla0.9.1
Target Milestone: --- → mozilla0.9.1
| Assignee | ||
Comment 6•25 years ago
|
||
| Assignee | ||
Comment 7•25 years ago
|
||
and I'm in the midst of testing it
Comment 8•25 years ago
|
||
Looks good. Just one comment:
+class CaseInsensitiveCharComparator
+ {
+ public:
+ PRBool operator()( char lhs, char rhs ) const { return nsCRT::ToUpper(lhs)
== nsCRT::ToUpper(rhs); }
+ };
Will the calls to nsCRT::ToUpper be inlined? If no, this could be a bottleneck.
Can we call toupper directly?
sr=sfraser if you think that's not an issue.
Comment 9•25 years ago
|
||
r=jst
| Assignee | ||
Comment 10•25 years ago
|
||
re: sfraser's comments --- I actually _do_ think it's an issue. Perhaps for
ASCII I should be building a different mechanism. The |PRUnichar| version is
not |inline|able, since it goes into the i18n code that theorecically does it
right using code around very compressed tables. The |char| version, though,
could be made to do the right thing. All these routines are wrong headed
though, because they presume a flat encoding, when no such promise has been
made. At least they continue to offer the level of functionality people need.
| Assignee | ||
Comment 11•25 years ago
|
||
patch checked in
Status: ASSIGNED → RESOLVED
Closed: 25 years ago
Resolution: --- → FIXED
Any plans for CaseInsensitiveRFindInReadable?
Updated•5 years ago
|
Component: String → XPCOM
You need to log in
before you can comment on or make changes to this bug.
Description
•