Răsfoiți Sursa

move string extension to string extension file

cyberta 3 ani în urmă
părinte
comite
283db93467

+ 0 - 6
deltachat-ios/Controller/WebxdcViewController.swift

@@ -224,12 +224,6 @@ class WebxdcViewController: WebViewViewController {
     }
 }
 
-extension String {
-    func toBase64() -> String {
-        return Data(self.utf8).base64EncodedString()
-    }
-}
-
 extension WebxdcViewController: WKScriptMessageHandler {
     func userContentController(_ userContentController: WKUserContentController, didReceive message: WKScriptMessage) {
         let handler = WebxdcHandler(rawValue: message.name)

+ 4 - 0
deltachat-ios/Extensions/String+Extension.swift

@@ -81,4 +81,8 @@ extension String {
             return "\(number)"
         }
     }
+
+    func toBase64() -> String {
+        return Data(self.utf8).base64EncodedString()
+    }
 }