{"url":"https://tablog.hatenablog.com/entry/2013/04/22/002301","blog_url":"https://tablog.hatenablog.com/","blog_title":"\u3046\u306b\u306d\u3053\u306b\u306a\u308a\u305f\u3044","author_name":"tacamula","published":"2013-04-22 00:23:01","categories":[],"image_url":null,"provider_name":"Hatena Blog","title":"NSString\u306enull or empty\u30c1\u30a7\u30c3\u30af","type":"rich","author_url":"https://blog.hatena.ne.jp/tacamula/","html":"<iframe src=\"https://hatenablog-parts.com/embed?url=https%3A%2F%2Ftablog.hatenablog.com%2Fentry%2F2013%2F04%2F22%2F002301\" title=\"NSString\u306enull or empty\u30c1\u30a7\u30c3\u30af - \u3046\u306b\u306d\u3053\u306b\u306a\u308a\u305f\u3044\" class=\"embed-card embed-blogcard\" scrolling=\"no\" frameborder=\"0\" style=\"display: block; width: 100%; height: 190px; max-width: 500px; margin: 10px 0px;\"></iframe>","provider_url":"https://hatena.blog","version":"1.0","width":"100%","description":"\u4e00\u4eba\u3067\u30b3\u30fc\u30c7\u30a3\u30f3\u30b0\u3057\u3066\u308b\u3068\u3001\u81ea\u5206\u304c\u66f8\u3044\u305f\u30b3\u30fc\u30c9\u304c\u30d9\u30b9\u30c8\u306a\u306e\u304b\u3069\u3046\u304b\u308f\u304b\u3093\u306a\u304f\u3066\u4e0d\u5b89\u306b\u306a\u3063\u305f\u306e\u3067\u8abf\u3079\u305f\u3002 \u6700\u521d\u306f\u30b7\u30f3\u30d7\u30eb\u306b NSString *text; if (text == nil && [text isEqualToString:@\"\"]) { // nil\u306e\u3068\u304d }\u3063\u3066\u66f8\u3044\u3066\u305f\u3093\u3060\u3051\u3069\u3001Java\u3067\u3044\u3046Apache StringUtils\u306eisBlank()\u7684\u306a\u30e1\u30bd\u30c3\u30c9\u306f\u306a\u3044\u3082\u3093\u304b\u3068\u63a2\u3057\u3066\u307f\u305f\u3089\u3001\u610f\u5916\u306a\u65b9\u6cd5\u304c\u3042\u308b\u3068\u306a\u3002 http://stackoverflow.com/questions/6177719/testing-for-nil-in-objective-c-ifx-nil-vs-\u2026","height":"190"}