{"id":33334,"date":"2021-08-01T08:07:19","date_gmt":"1970-01-01T00:00:00","guid":{"rendered":"http:\/\/www.sejuku.net\/blog\/?p=33334"},"modified":"2024-05-06T11:45:04","modified_gmt":"2024-05-06T02:45:04","slug":"%e3%80%90swift%e5%85%a5%e9%96%80%e3%80%91extension%e3%82%92%e6%b4%bb%e7%94%a8%e3%81%97%e3%81%a6%e7%be%8e%e3%81%97%e3%81%84%e3%82%b3%e3%83%bc%e3%83%89%e3%82%92%e6%9b%b8%e3%81%93%e3%81%86%ef%bc%81","status":"publish","type":"post","link":"https:\/\/www.sejuku.net\/blog\/33334","title":{"rendered":"\u3010Swift\u5165\u9580\u3011extension\u3068\u306f\uff1f\u4f7f\u3044\u65b9\u3092\u7406\u89e3\u3057\u3088\u3046"},"content":{"rendered":"<p>\u3053\u3093\u306b\u3061\u306f\u3002\u30e9\u30a4\u30bf\u30fc\u306e\u4e80\u7530\u3067\u3059\u3002<\/p>\n<p>2014\u5e74\u306b\u7a81\u5982\u767a\u8868\u3055\u308c\u305f\u30a2\u30c3\u30d7\u30eb\u306e\u65b0\u30d7\u30ed\u30b0\u30e9\u30df\u30f3\u30b0\u8a00\u8a9e\u3067\u3042\u308b<span style=\"color: #339966\"><strong>Swift<\/strong><\/span>(\u203b)\u306f\u3001\u77ac\u304f\u9593\u306b\u53d7\u3051\u5165\u308c\u3089\u308c\u307e\u3057\u305f\u3002<\/p>\n<p>\u7406\u7531\u306f\u3044\u304f\u3064\u304b\u3042\u308a\u307e\u3059\u304c\u3001\u305d\u308c\u307e\u3067\u30a2\u30c3\u30d7\u30eb\u793e\u306e\u88fd\u54c1\u306e\u4e3b\u8981\u306a\u30d7\u30ed\u30b0\u30e9\u30df\u30f3\u30b0\u8a00\u8a9e\u3067\u3042\u3063\u305fObjective-C\u306b\u6bd4\u3079\u3001<span style=\"color: #0000ff\"><strong>\u65ac\u65b0\u306a\u6a5f\u80fd<\/strong><\/span>\u304c\u3044\u304f\u3064\u3082\u3042\u308a\u307e\u3057\u305f\u3002<\/p>\n<p>\u305d\u306e\u4e2d\u306e\u4e00\u3064\u306b\u3001\u4eca\u56de\u7d39\u4ecb\u3059\u308b<span style=\"color: #339966\"><strong>extension<\/strong><\/span>\u304c\u3042\u308a\u307e\u3059\u3002<\/p>\n<p>\u3053\u3053\u3067\u306f\u3001<\/p>\n<p><span style=\"color: #ff0000\"><strong>\u30fbextension\u3068\u306f\u4f55\u304b<\/strong><\/span><br \/>\n<span style=\"color: #ff0000\"><strong>\u30fbextension\u304cSwift\u30d7\u30ed\u30b0\u30e9\u30df\u30f3\u30b0\u3092\u5feb\u9069\u306b\u3059\u308b\u7406\u7531<\/strong><\/span><\/p>\n<p>\u3067\u3001extension\u306e\u6982\u5ff5\u305d\u306e\u3082\u306e\u3092\u8aac\u660e\u3057\u307e\u3059\u3002\u3055\u3089\u306b\u3001<\/p>\n<p><span style=\"color: #ff0000\"><strong>\u30fbextension\u306e\u5177\u4f53\u7684\u4f7f\u7528\u4f8b<\/strong><\/span><\/p>\n<p>\u3067\u3001\u5b9f\u969b\u306b\u3055\u307e\u3056\u307e\u306a\u30b5\u30f3\u30d7\u30eb\u3092\u901a\u3057\u3066\u3001<span style=\"color: #339966\"><strong>extension<\/strong><\/span>\u306e\u4f7f\u3044\u65b9\u3092\u7d39\u4ecb\u3057\u307e\u3059\u3002<\/p>\n<p>\u203b\u3053\u306e\u8a18\u4e8b\u3067\u306fSwift3.1\u3092\u4f7f\u7528\u3057\u3066\u3044\u307e\u3059\u3002<\/p>\n<h2>extension\u3068\u306f\u4f55\u304b<\/h2>\n<p>extension\u3068\u306f\u3001<span style=\"color: #339966\"><strong>\u62e1\u5f35\u3059\u308b<\/strong><\/span>\u3068\u3044\u3046\u610f\u5473\u3067\u3042\u308a\u3001<\/p>\n<p><span style=\"color: #339966\"><strong>\u30fb\u30af\u30e9\u30b9<\/strong><\/span><br \/>\n<span style=\"color: #339966\"><strong>\u30fb\u69cb\u9020\u4f53<\/strong><\/span><br \/>\n<span style=\"color: #339966\"><strong>\u30fb\u5217\u6319\u578b<\/strong><\/span><\/p>\n<p>\u306b\u5bfe\u3057\u3066<span style=\"color: #0000ff\"><strong>\u6a5f\u80fd\u3092\u62e1\u5f35<\/strong><\/span>\u3067\u304d\u307e\u3059\u3002\u66f8\u5f0f\u306f\u4ee5\u4e0b\u306e\u3068\u304a\u308a\u306b\u306a\u308a\u307e\u3059\u3002<\/p>\n<pre class=\"striped:false marking:false ranges:false nums:false nums-toggle:false lang:default decode:true \">extension \uff08\u62e1\u5f35\u3059\u308b\u3082\u306e\u306e\u540d\u524d\uff09{\r\n  \/\/ \u8ffd\u52a0\u30e1\u30bd\u30c3\u30c9\u30fb\u30d7\u30ed\u30d1\u30c6\u30a3\u306a\u3069\u3092\u5b9a\u7fa9\r\n}<\/pre>\n<p>Objective-C\u306b\u8a73\u3057\u3044\u65b9\u306a\u3089\u3001\u3053\u308c\u304c\u3053\u306e\u8a00\u8a9e\u3067\u7528\u3044\u3089\u308c\u308b<span style=\"color: #ff0000\"><strong>\u30ab\u30c6\u30b4\u30ea\u3068\u540c\u3058\u3082\u306e<\/strong><\/span>\u3060\u3068\u601d\u308f\u308c\u308b\u304b\u3082\u3057\u308c\u307e\u305b\u3093\u3002<\/p>\n<p>\u305f\u3057\u304b\u306b\u57fa\u672c\u306f\u540c\u3058\u306a\u306e\u3067\u3059\u304c\u3001Swift \u3067\u306f<span style=\"color: #0000ff\"><strong>Int \u3084 Double \u306a\u3069\u306e\u30d7\u30ea\u30df\u30c6\u30a3\u30d6\u306a\u578b\u3067\u3082extension \u3067\u62e1\u5f35\u3059\u308b\u3053\u3068\u304c\u3067\u304d\u307e\u3059<\/strong><\/span>\u3002<\/p>\n<p>\u305d\u306e\u70b9\u304c\u6700\u5927\u306e\u9055\u3044\u3068\u3044\u3048\u307e\u3059\u3002<\/p>\n<h3>\u7d99\u627f\u306e\u6982\u5ff5\u3068\u306e\u9055\u3044<\/h3>\n<p>\u540c\u6642\u306b\u30af\u30e9\u30b9\u3092\u62e1\u5f35\u3059\u308b\u3068\u3044\u3046\u610f\u5473\u3067\u306f\u3001<span style=\"color: #339966\"><strong>\u7d99\u627f<\/strong><\/span>\u306e\u6982\u5ff5\u3068\u3082\u4f3c\u3066\u3044\u307e\u3059\u3002<\/p>\n<p>\u3057\u304b\u3057\u3001\u7d99\u627f\u306e\u5834\u5408\u306f\u3001\u3042\u308b<span style=\"color: #0000ff\"><strong>\u30af\u30e9\u30b9\u306e\u6a5f\u80fd\u3092\u62e1\u5f35\u3059\u308b\u306e\u306b\u5225\u306a\u30af\u30e9\u30b9\u3092\u7528\u610f\u3059\u308b\u5fc5\u8981<\/strong><\/span>\u304c\u3042\u308a\u307e\u3059\u3002<\/p>\n<p>\u305d\u308c\u306b\u5bfe\u3057\u3001<span style=\"color: #0000ff\"><strong>extension\u306f\u3059\u3067\u306b\u3042\u308b\u30af\u30e9\u30b9\u3092\u52d5\u7684\u306b\u62e1\u5f35<\/strong><\/span>\u3059\u308b\u3053\u3068\u304c\u3067\u304d\u308b\u306e\u3067\u3059\u3002<\/p>\n<p>\u307e\u305f\u3001\u7d99\u627f\u306e\u5834\u5408\u306f\u3001\u65e2\u5b58\u306e\u30e1\u30bd\u30c3\u30c9\u3092\u4e0a\u66f8\u304d\u3059\u308b<span style=\"color: #339966\"><strong>\u30aa\u30fc\u30d0\u30fc\u30e9\u30a4\u30c9<\/strong><\/span>\u306e\u6982\u5ff5\u304c\u3042\u308a\u307e\u3059\u304c\u3001<span style=\"color: #ff0000\"><strong>extension\u306b\u306f\u305d\u308c\u304c\u3042\u308a\u307e\u305b\u3093\u3002<\/strong><\/span><\/p>\n<p>\u3064\u307e\u308a\u3001extension\u3067\u306f<span style=\"color: #ff0000\"><strong>\u3082\u3068\u3082\u3068\u3042\u308b\u6a5f\u80fd\u306e\u5909\u66f4\u306f\u3067\u304d\u306a\u3044<\/strong><\/span>\u306e\u3067\u3059\u3002<\/p>\n<h3>extension\u306e\u8a18\u8ff0\u4f8b<\/h3>\n<p>\u3067\u306f\u3001\u5177\u4f53\u7684\u306a\u8a18\u8ff0\u4f8b\u3092\u898b\u3066\u898b\u307e\u3057\u3087\u3046\u3002<\/p>\n<p>\u305f\u3068\u3048\u3070\u3001\u4ee5\u4e0b\u306e\u3088\u3046\u306a\u30af\u30e9\u30b9\u304c\u3042\u3063\u305f\u3068\u3057\u307e\u3059\u3002<\/p>\n<pre class=\"striped:false marking:false ranges:false nums:false nums-toggle:false lang:default decode:true \">\/\/ \u30d1\u30fc\u30bd\u30f3\r\nstruct Person {\r\n    let name: String        \/\/ \u540d\u524d\r\n    var age: Int            \/\/ \u5e74\u9f62\r\n}<\/pre>\n<p>\u3053\u306e\u69cb\u9020\u4f53\u3092\u4ee5\u4e0b\u306e\u3088\u3046\u306b\u3057\u3066\u30a4\u30f3\u30b9\u30bf\u30f3\u30b9\u3092\u751f\u6210\u3057\u307e\u3059\u3002<\/p>\n<pre class=\"striped:false marking:false ranges:false nums:false nums-toggle:false lang:default decode:true \">let taro = Person(name: &quot;\u5c71\u7530\u592a\u90ce&quot;, age: 35)<\/pre>\n<p>\u3053\u306e\u307e\u307e\u3067\u306f\u4f55\u306e\u30e1\u30bd\u30c3\u30c9\u3082\u3042\u308a\u307e\u305b\u3093\u3002\u305d\u3053\u3067<\/p>\n<pre class=\"striped:false marking:false ranges:false nums:false nums-toggle:false lang:default decode:true \">extension Person{\r\n func show(){\r\n  print(self.name,&quot;:&quot;,self.age)\r\n }\r\n}<\/pre>\n<p>\u3068\u3059\u308b\u3068\u3001\u3053\u3053\u306bshow()\u3068\u3044\u3046\u30e1\u30bd\u30c3\u30c9\u304c\u8ffd\u52a0\u3055\u308c\u307e\u3059\u3002\u3053\u308c\u306b\u3088\u308a<\/p>\n<pre class=\"striped:false marking:false ranges:false nums:false nums-toggle:false lang:default decode:true \">taro.show()<\/pre>\n<p>\u3068\u3059\u308b\u3068\u3001<\/p>\n<pre class=\"striped:false marking:false ranges:false nums:false nums-toggle:false lang:default decode:true \">\u5c71\u7530\u592a\u90ce\uff1a35<\/pre>\n<p>\u306e\u3088\u3046\u306a\u7d50\u679c\u304c\u51fa\u529b\u3055\u308c\u307e\u3059\u3002<\/p>\n<p>\u3053\u308c\u304cextension\u306e\u57fa\u672c\u7684\u306a\u4f7f\u3044\u65b9\u306e\u4e00\u4f8b\u3067\u3059\u3002<\/p>\n<h2>extension\u304cSwift\u30d7\u30ed\u30b0\u30e9\u30df\u30f3\u30b0\u3092\u5feb\u9069\u306b\u3059\u308b\u7406\u7531<\/h2>\n<p>\u524d\u8ff0\u306e\u3088\u3046\u306b\u3001Swift\u306eextension\u306e\u6982\u5ff5\u306fObjective-C\u306e\u30ab\u30c6\u30b4\u30ea\u3092\u62e1\u5f35\u3057\u305f\u3082\u306e\u3060\u3068\u3044\u3046\u3053\u3068\u306f\u3059\u3067\u306b\u8aac\u660e\u3057\u305f\u3068\u304a\u308a\u3067\u3059\u3002<\/p>\n<p>\u9055\u3044\u306f\u305d\u308c\u3060\u3051\u3067\u306f\u3042\u308a\u307e\u305b\u3093\u3002<\/p>\n<p>\u305d\u3082\u305d\u3082\u30ab\u30c6\u30b4\u30ea\u3068\u306f\u3001<span style=\"color: #0000ff\"><strong>\u65e2\u5b58\u306e\u30af\u30e9\u30b9\u306b\u30e1\u30bd\u30c3\u30c9\u3092\u8ffd\u52a0\u3059\u308b<\/strong><\/span>\u3068\u3044\u3046\u306e\u304c\u76ee\u7684\u3067\u3042\u3063\u305f\u306e\u306b\u5bfe\u3057\u3001extension\u3067\u306f\u3001\u4ee5\u4e0b\u306e\u3088\u3046\u306a\u6a5f\u80fd\u306e\u62e1\u5f35\u304c\u53ef\u80fd\u3067\u3059\u3002<\/p>\n<p><span style=\"color: #339966\"><strong>\u30fb\u8a08\u7b97\u30d7\u30ed\u30d1\u30c6\u30a3\uff08\u30af\u30e9\u30b9\u3001\u69cb\u9020\u4f53\u306b\u5bfe\u3057\u3066\uff09<\/strong><\/span><br \/>\n<span style=\"color: #339966\"><strong>\u30fb\u30bf\u30a4\u30d7\u30d7\u30ed\u30d1\u30c6\u30a3<\/strong><\/span><br \/>\n<span style=\"color: #339966\"><strong>\u30fb\u30e1\u30bd\u30c3\u30c9<\/strong><\/span><br \/>\n<span style=\"color: #339966\"><strong>\u30fbsubscript<\/strong><\/span><br \/>\n<span style=\"color: #339966\"><strong>\u30fb\u30a4\u30cb\u30b7\u30e3\u30e9\u30a4\u30b6(\u521d\u671f\u5316\u5b50)<\/strong><\/span><br \/>\n<span style=\"color: #339966\"><strong>\u30fb\u30cd\u30b9\u30c8\u3055\u308c\u305f\u578b<\/strong><\/span><br \/>\n<span style=\"color: #339966\"><strong>\u30fb \u30d7\u30ed\u30c8\u30b3\u30eb\u306b\u5bfe\u3059\u308b\u6e96\u62e0<\/strong><\/span><\/p>\n<p>\u3064\u307e\u308a\u3001<span style=\"color: #0000ff\"><strong>\u30ab\u30c6\u30b4\u30ea\u3088\u308a\u3082\u305a\u3063\u3068\u5f37\u529b\u306a\u6a5f\u80fd<\/strong><\/span>\u3060\u3068\u3044\u3046\u3053\u3068\u304c\u308f\u304b\u308a\u307e\u3059\u3002<\/p>\n<h2>extension\u306e\u5177\u4f53\u7684\u4f7f\u7528\u4f8b<\/h2>\n<p>\u524d\u8ff0\u306e\u3088\u3046\u306b<span style=\"color: #0000ff\"><strong>\u30ab\u30c6\u30b4\u30ea\u3068\u6bd4\u3079\u3066extension\u306f\u304b\u306a\u308a\u5f37\u529b<\/strong><\/span>\u306a\u6982\u5ff5\u3060\u3068\u3044\u3046\u3053\u3068\u304c\u308f\u304b\u308a\u307e\u3057\u305f\u3002<\/p>\n<p>\u6700\u5f8c\u306b\u3001\u305d\u308c\u3089\u3092\u5b9f\u969b\u306b\u5229\u7528\u3057\u305fextension\u3092\u7528\u3044\u305f\u5b9f\u969b\u306e<span style=\"color: #0000ff\"><strong>\u7c21\u5358\u306a\u5b9f\u4f8b<\/strong><\/span>\u3092\u7d39\u4ecb\u3057\u307e\u3057\u3087\u3046\u3002<\/p>\n<h3>\u30c7\u30fc\u30bf\u578b\u306e\u62e1\u5f35\u3068\u7bc4\u56f2\u691c\u51fa<\/h3>\n<p>\u307e\u305a\u306f\u3001\u57fa\u672c\u7684\u306a\u30c7\u30fc\u30bf\u578b\u306e\u30af\u30e9\u30b9\u306e\u4e00\u3064\u3067\u3042\u308b\u3001<span style=\"color: #339966\"><strong>Int<\/strong><\/span>\u306bextension\u3092\u5c0e\u5165\u3057\u305f\u5b9f\u4f8b\u3092\u898b\u3066\u307f\u307e\u3057\u3087\u3046\u3002<\/p>\n<pre class=\"decode:true \">extension Int {\r\n    static var zero: Int { return 0 }\r\n    mutating func inverse() {\r\n        self = -self\r\n    }\r\n}\r\n\/\/ Int\u306ezero\u30d7\u30ed\u30d1\u30c6\u30a3\u3092\u8868\u793a\u3059\u308b\r\nprint(Int.zero)\r\n\/\/ n\u306b\uff13\u3092\u4ee3\u5165\u3057\u3001\u7b26\u53f7\u3092\u9006\u8ee2\u3055\u305b\u308b\r\nvar n = 3;\r\nn.inverse();\r\nprint(n);<\/pre>\n<p>\u5b9f\u884c\u7d50\u679c<\/p>\n<pre class=\"striped:false marking:false ranges:false nums:false nums-toggle:false lang:default decode:true \">0\r\n-3<\/pre>\n<p><span style=\"color: #339966\"><strong>Int<\/strong><\/span>\u306f\u3082\u3068\u3082\u3068\u5b58\u5728\u3059\u308b\u6574\u6570\u3092\u8868\u3059\u30af\u30e9\u30b9\u3067\u3059\u304c\u3001\u3053\u306e\u3088\u3046\u306b\u7c21\u5358\u306b<span style=\"color: #0000ff\"><strong>\u30d7\u30ed\u30d1\u30c6\u30a3\u3084\u30e1\u30bd\u30c3\u30c9\u3092\u8ffd\u52a0<\/strong><\/span>\u3067\u304d\u307e\u3059\u3002<\/p>\n<p>zero\u30d7\u30ed\u30d1\u30c6\u30a3\u3067\u306f\u3001\u5024\u304c\uff10\u306eInt\u3092\u53d6\u5f97\u3067\u304d\u307e\u3059\u3002<\/p>\n<p>\u307e\u305f\u3001inverse()\u30e1\u30bd\u30c3\u30c9\u3092\u547c\u3076\u3053\u3068\u306b\u3088\u308a\u3001\u7b26\u53f7\u3092\u9006\u8ee2\u3059\u308b\u3053\u3068\u304c\u53ef\u80fd\u3067\u3059\u3002<\/p>\n<p><span style=\"color: #0000ff\"><strong>\u5024\u578b\u306b\u5bfe\u3057\u3066\u81ea\u5206\u81ea\u8eab\u3084\u4ed8\u968f\u3059\u308b\u30d7\u30ed\u30d1\u30c6\u30a3\u3092\u5909\u66f4<\/strong><\/span>\u3059\u308b\u5834\u5408\u3001<span style=\"color: #339966\"><strong>mutating<\/strong><\/span>\u3092\u30e1\u30bd\u30c3\u30c9\u306b\u4ed8\u3051\u307e\u3059\u3002<\/p>\n<p>\u3053\u308c\u306b\u3088\u308a\u3001\u81ea\u8eab\u306e\u7b26\u53f7\u3092\u9006\u8ee2\u3059\u308b\u3053\u3068\u304c\u3067\u304d\u307e\u3059\u3002<\/p>\n<h3>\u30af\u30e9\u30b9\u306e\u62e1\u5f35\u3068\u521d\u671f\u5316\u5b50<\/h3>\n<p>\u6b21\u306b\u3001\u30af\u30e9\u30b9\u3092\u62e1\u5f35\u3057\u3066\u3001<span style=\"color: #339966\"><strong>\u30a4\u30cb\u30b7\u30e3\u30e9\u30a4\u30b6\uff08\u521d\u671f\u5316\u5b50\uff09<\/strong><\/span>\u3092\u5c0e\u5165\u3057\u3066\u307f\u308b\u3053\u3068\u306b\u3057\u307e\u3059\u3002<\/p>\n<pre class=\"decode:true \">struct Person {\r\n    var name: String\r\n    init?(_ name: String) {\r\n        self.name = name\r\n    }\r\n}\r\n\r\nvar p = Person(&quot;Tom&quot;)\r\nprint(p!.name)<\/pre>\n<pre class=\"striped:false marking:false ranges:false nums:false nums-toggle:false lang:default decode:true \">Tom<\/pre>\n<p><span style=\"color: #339966\"><strong>init?()<\/strong><\/span>\u306e\u90e8\u5206\u304c\u30a4\u30cb\u30b7\u30e3\u30e9\u30a4\u30b6\u3067\u3059\u3002\u3053\u306e\u6982\u5ff5\u306f\u30af\u30e9\u30b9\u306e<span style=\"color: #0000ff\"><strong>\u30b3\u30f3\u30b9\u30c8\u30e9\u30af\u30bf\u306e\u6982\u5ff5\u306b\u4f3c\u3066\u3044\u307e\u3059<\/strong><\/span>\u3002<\/p>\n<p>\u6700\u5927\u306e\u7279\u5fb4\u306f\u3053\u306e\u3088\u3046\u306b<span style=\"color: #0000ff\"><strong>\u30af\u30e9\u30b9\u306b\u5f8c\u4ed8\u3051\u3067\u304d\u308b<\/strong><\/span>\u3053\u3068\u306b\u3042\u308a\u307e\u3059\u3002<\/p>\n<h3>subscript\u306e\u8a18\u8ff0\u4f8b<\/h3>\n<p><span style=\"color: #339966\"><strong>subscript<\/strong><\/span>\u3068\u306f\u3001<span style=\"color: #0000ff\"><strong>\u914d\u5217\u306a\u3069\u306e\u6dfb\u3048\u5b57<\/strong><\/span>\u306e\u610f\u5473\u3067\u3059\u3002<\/p>\n<p>extend\u306b\u3088\u308a<span style=\"color: #0000ff\"><strong>\u65b0\u305f\u306b\u914d\u5217\u3068\u6dfb\u3048\u5b57\u306e\u6a5f\u80fd\u3092\u8ffd\u52a0<\/strong><\/span>\u3059\u308b\u3053\u3068\u3082\u3067\u304d\u307e\u3059\u3002<\/p>\n<pre class=\"decode:true \">import Foundation\r\n\r\nextension Double {\r\n    subscript(digitIndex: Int) -&gt; Int {\r\n        let digitBase = pow(10.0, Double(digitIndex))\r\n        return Int(self \/ digitBase) % 10\r\n    }\r\n}\r\nprint(1234.01234[0] )\r\nprint(1234.01234[2] )\r\nprint(1234.01234[-2] )<\/pre>\n<pre class=\"striped:false marking:false ranges:false nums:false nums-toggle:false lang:default decode:true \">4\r\n2\r\n1<\/pre>\n<h3>\u30cd\u30b9\u30c8\u306e\u8a18\u8ff0\u4f8b<\/h3>\n<p>\u6700\u5f8c\u306b<span style=\"color: #339966\"><strong>\u30cd\u30b9\u30c8<\/strong><\/span>\u3092\u7d39\u4ecb\u3057\u307e\u3059\u3002\u3053\u308c\u306fextension\u306e<span style=\"color: #339966\"><strong>\u5165\u308c\u5b50\u69cb\u9020<\/strong><\/span>\u306e\u3053\u3068\u3067\u3059\u3002<\/p>\n<pre class=\"decode:true \">extension Double {\r\n    enum Sign {\r\n        case Plus\r\n        case Zero\r\n        case Minus\r\n    }\r\n    var sign: Sign {\r\n        if self &gt; 0 {\r\n            return .Plus\r\n        } else if self &lt; 0 {\r\n            return .Minus\r\n        } else {\r\n            return .Zero\r\n        }\r\n    }\r\n}\r\n\r\nprint((5.1).sign)\r\nprint((-2.1).sign)\r\nprint((0.0).sign)<\/pre>\n<pre class=\"striped:false marking:false ranges:false nums:false nums-toggle:false lang:default decode:true \">Plus\r\nMinus\r\nZero<\/pre>\n<h2>\u307e\u3068\u3081<\/h2>\n<p>\u4ee5\u4e0a\u306e\u3088\u3046\u306b\u3001Swift\u306b\u306fextension\u3068\u3044\u3046<span style=\"color: #0000ff\"><strong>\u5927\u5909\u5f37\u529b\u306a\u6a5f\u80fd<\/strong><\/span>\u306b\u3064\u3044\u3066\u4ee5\u4e0b\u306e\u3088\u3046\u306a\u6d41\u308c\u3067\u8aac\u660e\u3057\u3066\u304d\u307e\u3057\u305f\u3002<\/p>\n<p><span style=\"color: #ff0000\"><strong>\u30fbextension\u3068\u306f\u4f55\u304b<\/strong><\/span><br \/>\n<span style=\"color: #ff0000\"><strong>\u30fbextension\u304cSwift\u30d7\u30ed\u30b0\u30e9\u30df\u30f3\u30b0\u3092\u5feb\u9069\u306b\u3059\u308b\u7406\u7531<\/strong><\/span><br \/>\n<span style=\"color: #ff0000\"><strong>\u30fbextension\u306e\u5177\u4f53\u7684\u4f7f\u7528\u4f8b<\/strong><\/span><\/p>\n<p>Swift\u306b\u306f\u3053\u306e\u307b\u304b\u306b\u3082\u3001<span style=\"color: #ff0000;background-color: #ffff99\"><strong>Objective-C\u306b\u3082\u3068\u3082\u3068\u3042\u3063\u305f\u6a5f\u80fd\u3092\u62e1\u5f35\u3057\u3066\u3055\u3089\u306b\u5f37\u529b\u306b\u3057\u305f\u6a5f\u80fd<\/strong><\/span>\u304c\u305f\u304f\u3055\u3093\u3042\u308a\u307e\u3059\u3002<\/p>\n<p>\u305d\u3057\u3066\u305d\u308c\u3089\u306e\u6a5f\u80fd\u306f<span style=\"color: #0000ff\"><strong>\u73fe\u5728\u3067\u3082\u9032\u5316\u3092\u7d9a\u3051\u3066\u3044\u307e\u3059<\/strong><\/span>\u3002<\/p>\n<p>\u3055\u3089\u306b\u6a5f\u80fd\u306f\u4fbf\u5229\u306a\u3060\u3051\u3067\u306f\u306a\u304f\u4e0a\u624b\u306b\u6d3b\u7528\u3059\u308c\u3070<span style=\"color: #0000ff\"><strong>\u3088\u308a\u7f8e\u3057\u3044\u30bd\u30fc\u30b9\u30b3\u30fc\u30c9\u3092\u66f8\u304f\u3053\u3068\u304c\u53ef\u80fd<\/strong><\/span>\u3067\u3059\u3002<\/p>\n<p>\u3053\u306e\u8a18\u4e8b\u306b\u8208\u5473\u3092\u3082\u305f\u308c\u305f\u3089\u65b9\u306f\u305d\u306e\u3088\u3046\u306a\u6a5f\u80fd\u306b\u3064\u3044\u3066\u3082\u5b66\u7fd2\u3057\u3066\u307f\u308b\u3053\u3068\u3092\u304a\u52e7\u3081\u3057\u307e\u3059\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u3053\u3093\u306b\u3061\u306f\u3002\u30e9\u30a4\u30bf\u30fc\u306e\u4e80\u7530\u3067\u3059\u3002 2014\u5e74\u306b\u7a81\u5982\u767a\u8868\u3055\u308c\u305f\u30a2\u30c3\u30d7\u30eb\u306e\u65b0\u30d7\u30ed\u30b0\u30e9\u30df\u30f3\u30b0\u8a00\u8a9e\u3067\u3042\u308bSwift(\u203b)\u306f\u3001\u77ac\u304f\u9593\u306b\u53d7\u3051\u5165\u308c\u3089\u308c\u307e\u3057\u305f\u3002 \u7406\u7531\u306f\u3044\u304f\u3064\u304b\u3042\u308a\u307e\u3059\u304c\u3001\u305d\u308c\u307e\u3067\u30a2\u30c3\u30d7\u30eb\u793e\u306e\u88fd\u54c1\u306e\u4e3b\u8981\u306a\u30d7\u30ed\u30b0\u30e9\u30df\u30f3\u30b0\u8a00 [&hellip;]<\/p>\n","protected":false},"author":4,"featured_media":94754,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"inline_featured_image":false,"swell_btn_cv_data":"","footnotes":""},"categories":[10],"tags":[685],"class_list":["post-33334","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-swift","tag-swift"],"acf":[],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.4 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>\u3010Swift\u5165\u9580\u3011extension\u3068\u306f\uff1f\u4f7f\u3044\u65b9\u3092\u7406\u89e3\u3057\u3088\u3046 | \u4f8d\u30a8\u30f3\u30b8\u30cb\u30a2\u30d6\u30ed\u30b0<\/title>\n<meta name=\"description\" content=\"\u3053\u306e\u8a18\u4e8b\u3067\u306f\u300c \u3010Swift\u5165\u9580\u3011extension\u3068\u306f\uff1f\u4f7f\u3044\u65b9\u3092\u7406\u89e3\u3057\u3088\u3046 \u300d\u306b\u3064\u3044\u3066\u3001\u8ab0\u3067\u3082\u7406\u89e3\u3067\u304d\u308b\u3088\u3046\u306b\u89e3\u8aac\u3057\u307e\u3059\u3002\u3053\u306e\u8a18\u4e8b\u3092\u8aad\u3081\u3070\u3001\u3042\u306a\u305f\u306e\u60a9\u307f\u304c\u89e3\u6c7a\u3059\u308b\u3060\u3051\u3058\u3083\u306a\u304f\u3001\u65b0\u305f\u306a\u6c17\u4ed8\u304d\u3082\u767a\u898b\u3067\u304d\u308b\u3053\u3068\u3067\u3057\u3087\u3046\u3002\u304a\u60a9\u307f\u306e\u65b9\u306f\u305c\u3072\u3054\u4e00\u8aad\u304f\u3060\u3055\u3044\u3002\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.sejuku.net\/blog\/33334\" \/>\n<meta property=\"og:locale\" content=\"ja_JP\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"\u3010Swift\u5165\u9580\u3011extension\u3068\u306f\uff1f\u4f7f\u3044\u65b9\u3092\u7406\u89e3\u3057\u3088\u3046 | \u4f8d\u30a8\u30f3\u30b8\u30cb\u30a2\u30d6\u30ed\u30b0\" \/>\n<meta property=\"og:description\" content=\"\u3053\u306e\u8a18\u4e8b\u3067\u306f\u300c \u3010Swift\u5165\u9580\u3011extension\u3068\u306f\uff1f\u4f7f\u3044\u65b9\u3092\u7406\u89e3\u3057\u3088\u3046 \u300d\u306b\u3064\u3044\u3066\u3001\u8ab0\u3067\u3082\u7406\u89e3\u3067\u304d\u308b\u3088\u3046\u306b\u89e3\u8aac\u3057\u307e\u3059\u3002\u3053\u306e\u8a18\u4e8b\u3092\u8aad\u3081\u3070\u3001\u3042\u306a\u305f\u306e\u60a9\u307f\u304c\u89e3\u6c7a\u3059\u308b\u3060\u3051\u3058\u3083\u306a\u304f\u3001\u65b0\u305f\u306a\u6c17\u4ed8\u304d\u3082\u767a\u898b\u3067\u304d\u308b\u3053\u3068\u3067\u3057\u3087\u3046\u3002\u304a\u60a9\u307f\u306e\u65b9\u306f\u305c\u3072\u3054\u4e00\u8aad\u304f\u3060\u3055\u3044\u3002\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.sejuku.net\/blog\/33334\" \/>\n<meta property=\"og:site_name\" content=\"\u4f8d\u30a8\u30f3\u30b8\u30cb\u30a2\u30d6\u30ed\u30b0\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/sejuku2013\" \/>\n<meta property=\"article:author\" content=\"https:\/\/www.facebook.com\/sejuku2013\/\" \/>\n<meta property=\"article:published_time\" content=\"1970-01-01T00:00:00+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2024-05-06T02:45:04+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/www.sejuku.net\/blog\/wp-content\/uploads\/2017\/09\/swift.jpg\" \/>\n\t<meta property=\"og:image:width\" content=\"700\" \/>\n\t<meta property=\"og:image:height\" content=\"400\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/jpeg\" \/>\n<meta name=\"author\" content=\"\u4f8d\u30a8\u30f3\u30b8\u30cb\u30a2\u7de8\u96c6\u90e8\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@https:\/\/twitter.com\/samuraijuku\" \/>\n<meta name=\"twitter:site\" content=\"@samuraijuku\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/www.sejuku.net\\\/blog\\\/33334#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.sejuku.net\\\/blog\\\/33334\"},\"author\":{\"name\":\"\u4f8d\u30a8\u30f3\u30b8\u30cb\u30a2\u7de8\u96c6\u90e8\",\"@id\":\"https:\\\/\\\/www.sejuku.net\\\/blog\\\/#\\\/schema\\\/person\\\/e8ca7fd09857a736a25e6b4455a3ab61\"},\"headline\":\"\u3010Swift\u5165\u9580\u3011extension\u3068\u306f\uff1f\u4f7f\u3044\u65b9\u3092\u7406\u89e3\u3057\u3088\u3046\",\"datePublished\":\"1970-01-01T00:00:00+00:00\",\"dateModified\":\"2024-05-06T02:45:04+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/www.sejuku.net\\\/blog\\\/33334\"},\"wordCount\":55,\"publisher\":{\"@id\":\"https:\\\/\\\/www.sejuku.net\\\/blog\\\/#organization\"},\"image\":{\"@id\":\"https:\\\/\\\/www.sejuku.net\\\/blog\\\/33334#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/www.sejuku.net\\\/blog\\\/wp-content\\\/uploads\\\/2017\\\/09\\\/swift.jpg\",\"keywords\":[\"Swift\"],\"articleSection\":[\"Swift\"],\"inLanguage\":\"ja\"},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/www.sejuku.net\\\/blog\\\/33334\",\"url\":\"https:\\\/\\\/www.sejuku.net\\\/blog\\\/33334\",\"name\":\"\u3010Swift\u5165\u9580\u3011extension\u3068\u306f\uff1f\u4f7f\u3044\u65b9\u3092\u7406\u89e3\u3057\u3088\u3046 | \u4f8d\u30a8\u30f3\u30b8\u30cb\u30a2\u30d6\u30ed\u30b0\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.sejuku.net\\\/blog\\\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\\\/\\\/www.sejuku.net\\\/blog\\\/33334#primaryimage\"},\"image\":{\"@id\":\"https:\\\/\\\/www.sejuku.net\\\/blog\\\/33334#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/www.sejuku.net\\\/blog\\\/wp-content\\\/uploads\\\/2017\\\/09\\\/swift.jpg\",\"datePublished\":\"1970-01-01T00:00:00+00:00\",\"dateModified\":\"2024-05-06T02:45:04+00:00\",\"description\":\"\u3053\u306e\u8a18\u4e8b\u3067\u306f\u300c \u3010Swift\u5165\u9580\u3011extension\u3068\u306f\uff1f\u4f7f\u3044\u65b9\u3092\u7406\u89e3\u3057\u3088\u3046 \u300d\u306b\u3064\u3044\u3066\u3001\u8ab0\u3067\u3082\u7406\u89e3\u3067\u304d\u308b\u3088\u3046\u306b\u89e3\u8aac\u3057\u307e\u3059\u3002\u3053\u306e\u8a18\u4e8b\u3092\u8aad\u3081\u3070\u3001\u3042\u306a\u305f\u306e\u60a9\u307f\u304c\u89e3\u6c7a\u3059\u308b\u3060\u3051\u3058\u3083\u306a\u304f\u3001\u65b0\u305f\u306a\u6c17\u4ed8\u304d\u3082\u767a\u898b\u3067\u304d\u308b\u3053\u3068\u3067\u3057\u3087\u3046\u3002\u304a\u60a9\u307f\u306e\u65b9\u306f\u305c\u3072\u3054\u4e00\u8aad\u304f\u3060\u3055\u3044\u3002\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/www.sejuku.net\\\/blog\\\/33334#breadcrumb\"},\"inLanguage\":\"ja\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/www.sejuku.net\\\/blog\\\/33334\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"ja\",\"@id\":\"https:\\\/\\\/www.sejuku.net\\\/blog\\\/33334#primaryimage\",\"url\":\"https:\\\/\\\/www.sejuku.net\\\/blog\\\/wp-content\\\/uploads\\\/2017\\\/09\\\/swift.jpg\",\"contentUrl\":\"https:\\\/\\\/www.sejuku.net\\\/blog\\\/wp-content\\\/uploads\\\/2017\\\/09\\\/swift.jpg\",\"width\":700,\"height\":400},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/www.sejuku.net\\\/blog\\\/33334#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/www.sejuku.net\\\/blog\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"\u3010Swift\u5165\u9580\u3011extension\u3068\u306f\uff1f\u4f7f\u3044\u65b9\u3092\u7406\u89e3\u3057\u3088\u3046\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/www.sejuku.net\\\/blog\\\/#website\",\"url\":\"https:\\\/\\\/www.sejuku.net\\\/blog\\\/\",\"name\":\"\u4f8d\u30a8\u30f3\u30b8\u30cb\u30a2\u30d6\u30ed\u30b0\",\"description\":\"\u30d7\u30ed\u30b0\u30e9\u30df\u30f3\u30b0\u5b66\u7fd2\u306e\u3059\u3079\u3066\u304c\u30b3\u30b3\u306b\u3002\",\"publisher\":{\"@id\":\"https:\\\/\\\/www.sejuku.net\\\/blog\\\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/www.sejuku.net\\\/blog\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"ja\"},{\"@type\":\"Organization\",\"@id\":\"https:\\\/\\\/www.sejuku.net\\\/blog\\\/#organization\",\"name\":\"\u682a\u5f0f\u4f1a\u793eSAMURAI\",\"url\":\"https:\\\/\\\/www.sejuku.net\\\/blog\\\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"ja\",\"@id\":\"https:\\\/\\\/www.sejuku.net\\\/blog\\\/#\\\/schema\\\/logo\\\/image\\\/\",\"url\":\"https:\\\/\\\/www.sejuku.net\\\/blog\\\/wp-content\\\/uploads\\\/2023\\\/07\\\/logo.png\",\"contentUrl\":\"https:\\\/\\\/www.sejuku.net\\\/blog\\\/wp-content\\\/uploads\\\/2023\\\/07\\\/logo.png\",\"width\":600,\"height\":600,\"caption\":\"\u682a\u5f0f\u4f1a\u793eSAMURAI\"},\"image\":{\"@id\":\"https:\\\/\\\/www.sejuku.net\\\/blog\\\/#\\\/schema\\\/logo\\\/image\\\/\"},\"sameAs\":[\"https:\\\/\\\/www.facebook.com\\\/sejuku2013\",\"https:\\\/\\\/x.com\\\/samuraijuku\",\"https:\\\/\\\/www.youtube.com\\\/channel\\\/UCCFOQO5aDK0xXam4cUQXT8g\\\/featured\"]},{\"@type\":\"Person\",\"@id\":\"https:\\\/\\\/www.sejuku.net\\\/blog\\\/#\\\/schema\\\/person\\\/e8ca7fd09857a736a25e6b4455a3ab61\",\"name\":\"\u4f8d\u30a8\u30f3\u30b8\u30cb\u30a2\u7de8\u96c6\u90e8\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"ja\",\"@id\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/507c280c5c67d2c11fec4fdba20e5bf1ec2fe91f9deb42d2ec50382778b311bf?s=96&d=mm&r=g\",\"url\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/507c280c5c67d2c11fec4fdba20e5bf1ec2fe91f9deb42d2ec50382778b311bf?s=96&d=mm&r=g\",\"contentUrl\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/507c280c5c67d2c11fec4fdba20e5bf1ec2fe91f9deb42d2ec50382778b311bf?s=96&d=mm&r=g\",\"caption\":\"\u4f8d\u30a8\u30f3\u30b8\u30cb\u30a2\u7de8\u96c6\u90e8\"},\"description\":\"\u3010\u30d7\u30ed\u30d5\u30a3\u30fc\u30eb\u3011 DX\u8a8d\u5b9a\u53d6\u5f97\u4e8b\u696d\u8005\u306b\u9078\u5b9a\u3055\u308c\u3066\u3044\u308b\u682a\u5f0f\u4f1a\u793eSAMURAI\u306e\u30de\u30fc\u30b1\u30c6\u30a3\u30f3\u30b0\u30fb\u30b3\u30df\u30e5\u30cb\u30b1\u30fc\u30b7\u30e7\u30f3\u90e8\u304c\u904b\u55b6\u3002\u300c\u8cea\u306e\u9ad8\u3044IT\u6559\u80b2\u3092\u3001\u3059\u3079\u3066\u306e\u4eba\u306b\u300d\u3092\u30df\u30c3\u30b7\u30e7\u30f3\u306b\u3001IT\u30fb\u30d7\u30ed\u30b0\u30e9\u30df\u30f3\u30b0\u3092\u5b66\u3073\u59cb\u3081\u305f\u521d\u5b66\u8005\u306e\u65b9\u306b\u5411\u3051\u8a18\u4e8b\u3092\u57f7\u7b46\u3002 \u7d2f\u8a08\u6307\u5c0e\u8005\u65704\u4e075,000\u540d\u4ee5\u4e0a\u306e\u30d7\u30ed\u30b0\u30e9\u30df\u30f3\u30b0\u30b9\u30af\u30fc\u30eb\u300c\u4f8d\u30a8\u30f3\u30b8\u30cb\u30a2\u300d\u3001\u7d2f\u8a08\u767b\u9332\u8005\u65701\u4e078,000\u4eba\u4ee5\u4e0a\u306e\u30aa\u30f3\u30e9\u30a4\u30f3\u5b66\u7fd2\u30b5\u30fc\u30d3\u30b9\u300c\u4f8d\u30c6\u30e9\u30b3\u30e4\u300d\u3067\u6271\u3046\u6559\u6750\u958b\u767a\u306e\u30ce\u30a6\u30cf\u30a6\u30012013\u5e74\u306e\u5275\u696d\u304b\u3089\u904b\u55b6\u3067\u5f97\u305f\u77e5\u898b\u306b\u57fa\u3065\u304d\u3001\u8a18\u4e8b\u306e\u57f7\u7b46\u3060\u3051\u3067\u306a\u304f\u7de8\u96c6\u30fb\u76e3\u4fee\u3082\u62c5\u5f53\u3057\u3066\u3044\u307e\u3059\u3002 \u3010\u5c02\u9580\u5206\u91ce\u3011 IT\\\/Web\u958b\u767a\\\/AI\u30fb\u30ed\u30dc\u30c3\u30c8\u958b\u767a\\\/\u30a4\u30f3\u30d5\u30e9\u958b\u767a\\\/\u30b2\u30fc\u30e0\u958b\u767a\\\/AI\\\/Web\u30c7\u30b6\u30a4\u30f3\",\"sameAs\":[\"https:\\\/\\\/www.sejuku.net\\\/\",\"https:\\\/\\\/www.facebook.com\\\/sejuku2013\\\/\",\"https:\\\/\\\/www.instagram.com\\\/samuraiengineer_official\\\/\",\"https:\\\/\\\/x.com\\\/https:\\\/\\\/twitter.com\\\/samuraijuku\",\"https:\\\/\\\/www.youtube.com\\\/channel\\\/UCCFOQO5aDK0xXam4cUQXT8g\"],\"url\":\"https:\\\/\\\/www.sejuku.net\\\/blog\\\/author\\\/samurai-blog\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"\u3010Swift\u5165\u9580\u3011extension\u3068\u306f\uff1f\u4f7f\u3044\u65b9\u3092\u7406\u89e3\u3057\u3088\u3046 | \u4f8d\u30a8\u30f3\u30b8\u30cb\u30a2\u30d6\u30ed\u30b0","description":"\u3053\u306e\u8a18\u4e8b\u3067\u306f\u300c \u3010Swift\u5165\u9580\u3011extension\u3068\u306f\uff1f\u4f7f\u3044\u65b9\u3092\u7406\u89e3\u3057\u3088\u3046 \u300d\u306b\u3064\u3044\u3066\u3001\u8ab0\u3067\u3082\u7406\u89e3\u3067\u304d\u308b\u3088\u3046\u306b\u89e3\u8aac\u3057\u307e\u3059\u3002\u3053\u306e\u8a18\u4e8b\u3092\u8aad\u3081\u3070\u3001\u3042\u306a\u305f\u306e\u60a9\u307f\u304c\u89e3\u6c7a\u3059\u308b\u3060\u3051\u3058\u3083\u306a\u304f\u3001\u65b0\u305f\u306a\u6c17\u4ed8\u304d\u3082\u767a\u898b\u3067\u304d\u308b\u3053\u3068\u3067\u3057\u3087\u3046\u3002\u304a\u60a9\u307f\u306e\u65b9\u306f\u305c\u3072\u3054\u4e00\u8aad\u304f\u3060\u3055\u3044\u3002","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.sejuku.net\/blog\/33334","og_locale":"ja_JP","og_type":"article","og_title":"\u3010Swift\u5165\u9580\u3011extension\u3068\u306f\uff1f\u4f7f\u3044\u65b9\u3092\u7406\u89e3\u3057\u3088\u3046 | \u4f8d\u30a8\u30f3\u30b8\u30cb\u30a2\u30d6\u30ed\u30b0","og_description":"\u3053\u306e\u8a18\u4e8b\u3067\u306f\u300c \u3010Swift\u5165\u9580\u3011extension\u3068\u306f\uff1f\u4f7f\u3044\u65b9\u3092\u7406\u89e3\u3057\u3088\u3046 \u300d\u306b\u3064\u3044\u3066\u3001\u8ab0\u3067\u3082\u7406\u89e3\u3067\u304d\u308b\u3088\u3046\u306b\u89e3\u8aac\u3057\u307e\u3059\u3002\u3053\u306e\u8a18\u4e8b\u3092\u8aad\u3081\u3070\u3001\u3042\u306a\u305f\u306e\u60a9\u307f\u304c\u89e3\u6c7a\u3059\u308b\u3060\u3051\u3058\u3083\u306a\u304f\u3001\u65b0\u305f\u306a\u6c17\u4ed8\u304d\u3082\u767a\u898b\u3067\u304d\u308b\u3053\u3068\u3067\u3057\u3087\u3046\u3002\u304a\u60a9\u307f\u306e\u65b9\u306f\u305c\u3072\u3054\u4e00\u8aad\u304f\u3060\u3055\u3044\u3002","og_url":"https:\/\/www.sejuku.net\/blog\/33334","og_site_name":"\u4f8d\u30a8\u30f3\u30b8\u30cb\u30a2\u30d6\u30ed\u30b0","article_publisher":"https:\/\/www.facebook.com\/sejuku2013","article_author":"https:\/\/www.facebook.com\/sejuku2013\/","article_published_time":"1970-01-01T00:00:00+00:00","article_modified_time":"2024-05-06T02:45:04+00:00","og_image":[{"width":700,"height":400,"url":"https:\/\/www.sejuku.net\/blog\/wp-content\/uploads\/2017\/09\/swift.jpg","type":"image\/jpeg"}],"author":"\u4f8d\u30a8\u30f3\u30b8\u30cb\u30a2\u7de8\u96c6\u90e8","twitter_card":"summary_large_image","twitter_creator":"@https:\/\/twitter.com\/samuraijuku","twitter_site":"@samuraijuku","schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/www.sejuku.net\/blog\/33334#article","isPartOf":{"@id":"https:\/\/www.sejuku.net\/blog\/33334"},"author":{"name":"\u4f8d\u30a8\u30f3\u30b8\u30cb\u30a2\u7de8\u96c6\u90e8","@id":"https:\/\/www.sejuku.net\/blog\/#\/schema\/person\/e8ca7fd09857a736a25e6b4455a3ab61"},"headline":"\u3010Swift\u5165\u9580\u3011extension\u3068\u306f\uff1f\u4f7f\u3044\u65b9\u3092\u7406\u89e3\u3057\u3088\u3046","datePublished":"1970-01-01T00:00:00+00:00","dateModified":"2024-05-06T02:45:04+00:00","mainEntityOfPage":{"@id":"https:\/\/www.sejuku.net\/blog\/33334"},"wordCount":55,"publisher":{"@id":"https:\/\/www.sejuku.net\/blog\/#organization"},"image":{"@id":"https:\/\/www.sejuku.net\/blog\/33334#primaryimage"},"thumbnailUrl":"https:\/\/www.sejuku.net\/blog\/wp-content\/uploads\/2017\/09\/swift.jpg","keywords":["Swift"],"articleSection":["Swift"],"inLanguage":"ja"},{"@type":"WebPage","@id":"https:\/\/www.sejuku.net\/blog\/33334","url":"https:\/\/www.sejuku.net\/blog\/33334","name":"\u3010Swift\u5165\u9580\u3011extension\u3068\u306f\uff1f\u4f7f\u3044\u65b9\u3092\u7406\u89e3\u3057\u3088\u3046 | \u4f8d\u30a8\u30f3\u30b8\u30cb\u30a2\u30d6\u30ed\u30b0","isPartOf":{"@id":"https:\/\/www.sejuku.net\/blog\/#website"},"primaryImageOfPage":{"@id":"https:\/\/www.sejuku.net\/blog\/33334#primaryimage"},"image":{"@id":"https:\/\/www.sejuku.net\/blog\/33334#primaryimage"},"thumbnailUrl":"https:\/\/www.sejuku.net\/blog\/wp-content\/uploads\/2017\/09\/swift.jpg","datePublished":"1970-01-01T00:00:00+00:00","dateModified":"2024-05-06T02:45:04+00:00","description":"\u3053\u306e\u8a18\u4e8b\u3067\u306f\u300c \u3010Swift\u5165\u9580\u3011extension\u3068\u306f\uff1f\u4f7f\u3044\u65b9\u3092\u7406\u89e3\u3057\u3088\u3046 \u300d\u306b\u3064\u3044\u3066\u3001\u8ab0\u3067\u3082\u7406\u89e3\u3067\u304d\u308b\u3088\u3046\u306b\u89e3\u8aac\u3057\u307e\u3059\u3002\u3053\u306e\u8a18\u4e8b\u3092\u8aad\u3081\u3070\u3001\u3042\u306a\u305f\u306e\u60a9\u307f\u304c\u89e3\u6c7a\u3059\u308b\u3060\u3051\u3058\u3083\u306a\u304f\u3001\u65b0\u305f\u306a\u6c17\u4ed8\u304d\u3082\u767a\u898b\u3067\u304d\u308b\u3053\u3068\u3067\u3057\u3087\u3046\u3002\u304a\u60a9\u307f\u306e\u65b9\u306f\u305c\u3072\u3054\u4e00\u8aad\u304f\u3060\u3055\u3044\u3002","breadcrumb":{"@id":"https:\/\/www.sejuku.net\/blog\/33334#breadcrumb"},"inLanguage":"ja","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.sejuku.net\/blog\/33334"]}]},{"@type":"ImageObject","inLanguage":"ja","@id":"https:\/\/www.sejuku.net\/blog\/33334#primaryimage","url":"https:\/\/www.sejuku.net\/blog\/wp-content\/uploads\/2017\/09\/swift.jpg","contentUrl":"https:\/\/www.sejuku.net\/blog\/wp-content\/uploads\/2017\/09\/swift.jpg","width":700,"height":400},{"@type":"BreadcrumbList","@id":"https:\/\/www.sejuku.net\/blog\/33334#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.sejuku.net\/blog\/"},{"@type":"ListItem","position":2,"name":"\u3010Swift\u5165\u9580\u3011extension\u3068\u306f\uff1f\u4f7f\u3044\u65b9\u3092\u7406\u89e3\u3057\u3088\u3046"}]},{"@type":"WebSite","@id":"https:\/\/www.sejuku.net\/blog\/#website","url":"https:\/\/www.sejuku.net\/blog\/","name":"\u4f8d\u30a8\u30f3\u30b8\u30cb\u30a2\u30d6\u30ed\u30b0","description":"\u30d7\u30ed\u30b0\u30e9\u30df\u30f3\u30b0\u5b66\u7fd2\u306e\u3059\u3079\u3066\u304c\u30b3\u30b3\u306b\u3002","publisher":{"@id":"https:\/\/www.sejuku.net\/blog\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.sejuku.net\/blog\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"ja"},{"@type":"Organization","@id":"https:\/\/www.sejuku.net\/blog\/#organization","name":"\u682a\u5f0f\u4f1a\u793eSAMURAI","url":"https:\/\/www.sejuku.net\/blog\/","logo":{"@type":"ImageObject","inLanguage":"ja","@id":"https:\/\/www.sejuku.net\/blog\/#\/schema\/logo\/image\/","url":"https:\/\/www.sejuku.net\/blog\/wp-content\/uploads\/2023\/07\/logo.png","contentUrl":"https:\/\/www.sejuku.net\/blog\/wp-content\/uploads\/2023\/07\/logo.png","width":600,"height":600,"caption":"\u682a\u5f0f\u4f1a\u793eSAMURAI"},"image":{"@id":"https:\/\/www.sejuku.net\/blog\/#\/schema\/logo\/image\/"},"sameAs":["https:\/\/www.facebook.com\/sejuku2013","https:\/\/x.com\/samuraijuku","https:\/\/www.youtube.com\/channel\/UCCFOQO5aDK0xXam4cUQXT8g\/featured"]},{"@type":"Person","@id":"https:\/\/www.sejuku.net\/blog\/#\/schema\/person\/e8ca7fd09857a736a25e6b4455a3ab61","name":"\u4f8d\u30a8\u30f3\u30b8\u30cb\u30a2\u7de8\u96c6\u90e8","image":{"@type":"ImageObject","inLanguage":"ja","@id":"https:\/\/secure.gravatar.com\/avatar\/507c280c5c67d2c11fec4fdba20e5bf1ec2fe91f9deb42d2ec50382778b311bf?s=96&d=mm&r=g","url":"https:\/\/secure.gravatar.com\/avatar\/507c280c5c67d2c11fec4fdba20e5bf1ec2fe91f9deb42d2ec50382778b311bf?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/507c280c5c67d2c11fec4fdba20e5bf1ec2fe91f9deb42d2ec50382778b311bf?s=96&d=mm&r=g","caption":"\u4f8d\u30a8\u30f3\u30b8\u30cb\u30a2\u7de8\u96c6\u90e8"},"description":"\u3010\u30d7\u30ed\u30d5\u30a3\u30fc\u30eb\u3011 DX\u8a8d\u5b9a\u53d6\u5f97\u4e8b\u696d\u8005\u306b\u9078\u5b9a\u3055\u308c\u3066\u3044\u308b\u682a\u5f0f\u4f1a\u793eSAMURAI\u306e\u30de\u30fc\u30b1\u30c6\u30a3\u30f3\u30b0\u30fb\u30b3\u30df\u30e5\u30cb\u30b1\u30fc\u30b7\u30e7\u30f3\u90e8\u304c\u904b\u55b6\u3002\u300c\u8cea\u306e\u9ad8\u3044IT\u6559\u80b2\u3092\u3001\u3059\u3079\u3066\u306e\u4eba\u306b\u300d\u3092\u30df\u30c3\u30b7\u30e7\u30f3\u306b\u3001IT\u30fb\u30d7\u30ed\u30b0\u30e9\u30df\u30f3\u30b0\u3092\u5b66\u3073\u59cb\u3081\u305f\u521d\u5b66\u8005\u306e\u65b9\u306b\u5411\u3051\u8a18\u4e8b\u3092\u57f7\u7b46\u3002 \u7d2f\u8a08\u6307\u5c0e\u8005\u65704\u4e075,000\u540d\u4ee5\u4e0a\u306e\u30d7\u30ed\u30b0\u30e9\u30df\u30f3\u30b0\u30b9\u30af\u30fc\u30eb\u300c\u4f8d\u30a8\u30f3\u30b8\u30cb\u30a2\u300d\u3001\u7d2f\u8a08\u767b\u9332\u8005\u65701\u4e078,000\u4eba\u4ee5\u4e0a\u306e\u30aa\u30f3\u30e9\u30a4\u30f3\u5b66\u7fd2\u30b5\u30fc\u30d3\u30b9\u300c\u4f8d\u30c6\u30e9\u30b3\u30e4\u300d\u3067\u6271\u3046\u6559\u6750\u958b\u767a\u306e\u30ce\u30a6\u30cf\u30a6\u30012013\u5e74\u306e\u5275\u696d\u304b\u3089\u904b\u55b6\u3067\u5f97\u305f\u77e5\u898b\u306b\u57fa\u3065\u304d\u3001\u8a18\u4e8b\u306e\u57f7\u7b46\u3060\u3051\u3067\u306a\u304f\u7de8\u96c6\u30fb\u76e3\u4fee\u3082\u62c5\u5f53\u3057\u3066\u3044\u307e\u3059\u3002 \u3010\u5c02\u9580\u5206\u91ce\u3011 IT\/Web\u958b\u767a\/AI\u30fb\u30ed\u30dc\u30c3\u30c8\u958b\u767a\/\u30a4\u30f3\u30d5\u30e9\u958b\u767a\/\u30b2\u30fc\u30e0\u958b\u767a\/AI\/Web\u30c7\u30b6\u30a4\u30f3","sameAs":["https:\/\/www.sejuku.net\/","https:\/\/www.facebook.com\/sejuku2013\/","https:\/\/www.instagram.com\/samuraiengineer_official\/","https:\/\/x.com\/https:\/\/twitter.com\/samuraijuku","https:\/\/www.youtube.com\/channel\/UCCFOQO5aDK0xXam4cUQXT8g"],"url":"https:\/\/www.sejuku.net\/blog\/author\/samurai-blog"}]}},"_links":{"self":[{"href":"https:\/\/www.sejuku.net\/blog\/wp-json\/wp\/v2\/posts\/33334","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.sejuku.net\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.sejuku.net\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.sejuku.net\/blog\/wp-json\/wp\/v2\/users\/4"}],"replies":[{"embeddable":true,"href":"https:\/\/www.sejuku.net\/blog\/wp-json\/wp\/v2\/comments?post=33334"}],"version-history":[{"count":0,"href":"https:\/\/www.sejuku.net\/blog\/wp-json\/wp\/v2\/posts\/33334\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.sejuku.net\/blog\/wp-json\/wp\/v2\/media\/94754"}],"wp:attachment":[{"href":"https:\/\/www.sejuku.net\/blog\/wp-json\/wp\/v2\/media?parent=33334"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.sejuku.net\/blog\/wp-json\/wp\/v2\/categories?post=33334"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.sejuku.net\/blog\/wp-json\/wp\/v2\/tags?post=33334"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}