Closed Bug 296286 Opened 19 years ago Closed 19 years ago

comparing embed strings

Categories

(Core :: XPCOM, enhancement)

x86
Linux
enhancement
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla1.8beta4

People

(Reporter: chpe, Assigned: benjamin)

References

Details

The embed AString/ACString string API provides no way to compare strings:
there's no .Equals, .EqualsLiteral, .EqualsASCII, and .EqualsLowerCaseASCII like
there is for internal strings. That makes using them in embedding application
quite cumbersome.
Yeah, you need to write your own comparators.  Use NS_CStringGetData to get the
raw character pointer and run length, and then use some comparator function like
memcmp or strcasecmp.
Severity: normal → enhancement
The xpcom path in bug 299992 has a fix for this.
Assignee: nobody → benjamin
Depends on: 299992
Fixed on trunk and 1.8 branch (by bug 299992).
Status: NEW → RESOLVED
Closed: 19 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla1.8beta4
Component: String → XPCOM
You need to log in before you can comment on or make changes to this bug.