WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
145201
Give StringView a utf8() API.
https://bugs.webkit.org/show_bug.cgi?id=145201
Summary
Give StringView a utf8() API.
Andreas Kling
Reported
2015-05-19 20:31:58 PDT
It would be nice if StringView had an API like String::utf8().
Attachments
Patch
(10.75 KB, patch)
2015-05-19 20:40 PDT
,
Andreas Kling
no flags
Details
Formatted Diff
Diff
Patch
(6.99 KB, patch)
2015-05-19 20:41 PDT
,
Andreas Kling
no flags
Details
Formatted Diff
Diff
Show Obsolete
(1)
View All
Add attachment
proposed patch, testcase, etc.
Andreas Kling
Comment 1
2015-05-19 20:40:22 PDT
Created
attachment 253422
[details]
Patch
Andreas Kling
Comment 2
2015-05-19 20:41:19 PDT
Created
attachment 253423
[details]
Patch
WebKit Commit Bot
Comment 3
2015-05-19 22:58:03 PDT
Comment on
attachment 253423
[details]
Patch Clearing flags on attachment: 253423 Committed
r184617
: <
http://trac.webkit.org/changeset/184617
>
WebKit Commit Bot
Comment 4
2015-05-19 22:58:06 PDT
All reviewed patches have been landed. Closing bug.
Darin Adler
Comment 5
2015-05-20 08:30:11 PDT
Comment on
attachment 253423
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=253423&action=review
> Source/WTF/wtf/text/StringImpl.h:519 > + static WTF_EXPORT_STRING_API CString utf8ForCharacters(const LChar* characters, unsigned length); > static WTF_EXPORT_STRING_API CString utf8ForCharacters(const UChar* characters, unsigned length, ConversionMode = LenientConversion);
For future consideration: It’s peculiar that these two functions are members of StringImpl. They would make more sense in the CString class itself, as free functions in UTF8.h, or possibly as members of StringView, which encapsulates character pointers and lengths.
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug