<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<oembed>
  <author_name>banbara</author_name>
  <author_url>https://blog.hatena.ne.jp/banbara/</author_url>
  <blog_title>BANBARA STUDIO</blog_title>
  <blog_url>https://banbara-studio.hatenablog.com/</blog_url>
  <categories>
    <anon>Kotlin</anon>
  </categories>
  <description>空白チェックを行う場合、if elseでもいいが、ifEmptyやifBlankでも便利にできる。 if elseの場合 val result = if (dummyText.isEmpty()) &quot;hello&quot; else &quot;&quot; println(result) // hello ifEmpty だとスッキリする val result = dummyText.ifEmpty { &quot;hello&quot; } println(result) // hello ifBlank はnullも扱える val result: String? = dummyText?.ifBlank { &quot;hello&quot; } ?: &quot;…</description>
  <height>190</height>
  <html>&lt;iframe src=&quot;https://hatenablog-parts.com/embed?url=https%3A%2F%2Fbanbara-studio.hatenablog.com%2Fentry%2F2020%2F07%2F03%2F110447&quot; title=&quot;KotlinのifEmptyとifBrank - BANBARA STUDIO&quot; class=&quot;embed-card embed-blogcard&quot; scrolling=&quot;no&quot; frameborder=&quot;0&quot; style=&quot;display: block; width: 100%; height: 190px; max-width: 500px; margin: 10px 0px;&quot;&gt;&lt;/iframe&gt;</html>
  <image_url></image_url>
  <provider_name>Hatena Blog</provider_name>
  <provider_url>https://hatena.blog</provider_url>
  <published>2020-07-03 11:04:47</published>
  <title>KotlinのifEmptyとifBrank</title>
  <type>rich</type>
  <url>https://banbara-studio.hatenablog.com/entry/2020/07/03/110447</url>
  <version>1.0</version>
  <width>100%</width>
</oembed>
