Bug 45591

Summary: Add WTF::equal for StringImpl and char* with explicit length
Product: WebKit Reporter: Patrick R. Gansterer <paroga>
Component: Web Template FrameworkAssignee: Nobody <webkit-unassigned>
Status: RESOLVED CONFIGURATION CHANGED    
Severity: Normal CC: ahmad.saleem792, ap, bfulgham, rniwa
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: All   
OS: All   
Attachments:
Description Flags
Patch none

Patrick R. Gansterer
Reported 2010-09-11 09:37:07 PDT
see patch
Attachments
Patch (3.57 KB, patch)
2010-09-11 09:43 PDT, Patrick R. Gansterer
no flags
Patrick R. Gansterer
Comment 1 2010-09-11 09:43:06 PDT
Created attachment 67300 [details] Patch I'll use this function for performance improvements of XMLParser (bug 43085).
Patrick R. Gansterer
Comment 2 2010-09-12 05:28:18 PDT
Comment on attachment 67300 [details] Patch Maybe I'll move the function into AtomicString for inlineing.
Ahmad Saleem
Comment 3 2022-07-25 13:33:17 PDT
Attached patch was modifying "equalIgnoringCase" - which was removed in below commit: https://github.com/WebKit/WebKit/commit/507aa34586fdcf0b9a5ea433c2402f295a717da8 Further - "createStrippingNullCharactersSlowCase" - it had only one commit below: https://github.com/WebKit/WebKit/commit/663efc5d78ea61ca1b418dbd67f3cd91676910a2 but even it was removed here: https://github.com/WebKit/WebKit/commit/539e5655d6da61859c0f9448691eea1892cae8bc So I don't think this patch can be applied to Github main / trunk / master branch since it has been changed drastically. Can someone comment whether it is something needed out of this or this can be marked as "RESOLVED WONTFIX"? Thanks!
Alexey Proskuryakov
Comment 4 2022-07-25 17:33:13 PDT
We have such functions now. WTF_EXPORT_PRIVATE bool equal(const StringImpl*, const LChar*, unsigned); WTF_EXPORT_PRIVATE bool equal(const StringImpl*, const UChar*, unsigned); ALWAYS_INLINE bool equal(const StringImpl* a, ASCIILiteral b) { return equal(a, b.characters8(), b.length()); } inline bool equal(const StringImpl* a, const char* b, unsigned length) { return equal(a, reinterpret_cast<const LChar*>(b), length); }
Note You need to log in before you can comment on or make changes to this bug.