Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(707)

Unified Diff: webrtc/base/objc/NSString+StdString.mm

Issue 1517253005: Update API for Objective-C RTCIceCandidate. (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@updateRTCIceServer
Patch Set: Remove copy Created 4 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« webrtc/api/api.gyp ('K') | « webrtc/base/objc/NSString+StdString.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webrtc/base/objc/NSString+StdString.mm
diff --git a/webrtc/base/objc/NSString+StdString.mm b/webrtc/base/objc/NSString+StdString.mm
index 95cbe7aacf00909b5d6f8b72b7fd08c2985cb9f1..3210ff0b65d48e2fd8a0d46380b4cddca07358e9 100644
--- a/webrtc/base/objc/NSString+StdString.mm
+++ b/webrtc/base/objc/NSString+StdString.mm
@@ -22,4 +22,12 @@
charData.length);
}
++ (NSString *)stringForStdString:(const std::string&)stdString {
+ // std::string may contain null termination character so we construct
+ // using length.
+ return [[NSString alloc] initWithBytes:stdString.data()
+ length:stdString.length()
+ encoding:NSUTF8StringEncoding];
+}
+
@end
« webrtc/api/api.gyp ('K') | « webrtc/base/objc/NSString+StdString.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698