Add String::format variant that takes va_args
authoreric.carlson@apple.com <eric.carlson@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 25 Aug 2017 20:23:57 +0000 (20:23 +0000)
committereric.carlson@apple.com <eric.carlson@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 25 Aug 2017 20:23:57 +0000 (20:23 +0000)
commitce48ded2f2a498905ef2fce1b804acb899018135
tree2cdbf2b8a7854af7ff10d2c882a6173ff7409f21
parent70310212b21fae5005c05510e8ba277f2815c21f
Add String::format variant that takes va_args
https://bugs.webkit.org/show_bug.cgi?id=175988

Reviewed by Jer Noble.

Source/WTF:

* wtf/text/WTFString.cpp:
(WTF::createWithFormatAndArguments): Created with the guts of String::format.
(WTF::String::formatWithArguments): New, call createWithFormatAndArguments.
(WTF::String::format): Move logic to createWithFormatAndArguments, use it.
* wtf/text/WTFString.h:

Tools:

* TestWebKitAPI/Tests/WTF/WTFString.cpp:
(TestWebKitAPI::testWithFormatAndArguments):
(TestWebKitAPI::TEST):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@221203 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Source/WTF/ChangeLog
Source/WTF/wtf/text/WTFString.cpp
Source/WTF/wtf/text/WTFString.h
Tools/ChangeLog
Tools/TestWebKitAPI/Tests/WTF/WTFString.cpp