{"id":1355,"date":"2020-12-28T17:29:04","date_gmt":"2020-12-28T09:29:04","guid":{"rendered":"http:\/\/123.57.164.21\/?p=1355"},"modified":"2020-12-28T17:29:04","modified_gmt":"2020-12-28T09:29:04","slug":"swift-%e5%ad%97%e7%ac%a6%e4%b8%b2%e4%b8%ad%e6%9f%a5%e6%89%be%e6%8c%87%e5%ae%9a%e5%ad%97%e7%ac%a6-%e5%b9%b6-%e5%88%86%e5%89%b2","status":"publish","type":"post","link":"https:\/\/92it.top\/?p=1355","title":{"rendered":"Swift \u5b57\u7b26\u4e32\u4e2d\u67e5\u627e\u6307\u5b9a\u5b57\u7b26 \u5e76 \u5206\u5272"},"content":{"rendered":"\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">    public class func splitFindItem(findStr:String, totalStr:String) -> [String] {\n        \n        let scanner = Scanner(string: totalStr)\n        \n        var keyWordSplit: [String] = []\n        \n        while !scanner.isAtEnd {\n            if let op = scanner.scanUpToString(findStr) {\n                if op != totalStr {\n                    keyWordSplit.append(op)\n                }\n            }\n            \n            if let op = scanner.scanString(findStr) {\n                keyWordSplit.append(op as String)\n            }\n        }\n        return keyWordSplit\n    }<\/pre>\n\n\n\n<p>splitFindItem(findStr:&#8221;23&#8243;, totalStr:&#8221;12345&#8243;)<\/p>\n\n\n\n<p>[&#8220;1&#8221;, &#8220;23&#8221;, &#8220;45&#8221;]<\/p>\n","protected":false},"excerpt":{"rendered":"<p>splitFindItem(findStr:&#8221;23&#8243;, totalStr:&#038;#8221 [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[8],"tags":[],"_links":{"self":[{"href":"https:\/\/92it.top\/index.php?rest_route=\/wp\/v2\/posts\/1355"}],"collection":[{"href":"https:\/\/92it.top\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/92it.top\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/92it.top\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/92it.top\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=1355"}],"version-history":[{"count":4,"href":"https:\/\/92it.top\/index.php?rest_route=\/wp\/v2\/posts\/1355\/revisions"}],"predecessor-version":[{"id":1359,"href":"https:\/\/92it.top\/index.php?rest_route=\/wp\/v2\/posts\/1355\/revisions\/1359"}],"wp:attachment":[{"href":"https:\/\/92it.top\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=1355"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/92it.top\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=1355"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/92it.top\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=1355"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}