Upgrade to Pro — share decks privately, control downloads, hide ads and more …

普段C#を使っている僕から見たKotlin

 普段C#を使っている僕から見たKotlin

普段C#を使っている僕から見たKotlin

2015/06/05(金)に開催された第3回 かわいいKotlin勉強会の発表資料です。

#jkug

https://kotlin.doorkeeper.jp/events/23515

RyotaMurohoshi

June 05, 2015
Tweet

More Decks by RyotaMurohoshi

Other Decks in Technology

Transcript

  1. ݺͼग़͠ଆͰ໊લ෇͖Ҿ਺Λ࢖͏ͱʂ reformat( str, normalizeCase = true, uppercaseFirstLetter = true, divideByCamelHumps

    = false, wordSeparator = '_' ) ͲͷҾ਺͕ͲͷΑ͏ͳҙຯͳͷ͔ɺ͢ΜͳΓಡΊΔʂ
  2. h"ps:/ /github.com/JetBrains/kotlin/blob/build90.12.1525/libraries/stdlib/src/kotlin/collec>ons/JU>l.kt@ ΑΓ package kotlin import java.util.* (લུ) /** Returns

    true if the collection is not empty */ public fun <T> Collection<T>.isNotEmpty(): Boolean = !isEmpty() (ޙུ)
  3. h"ps:/ /github.com/JetBrains/kotlin/blob/build90.12.1525/libraries/stdlib/src/kotlin/collec>ons/JU>l.kt@ ΑΓ package kotlin import java.util.* (લུ) /** Returns

    true if the collection is not empty */ public fun <T> Collection<T>.isNotEmpty(): Boolean = !isEmpty() (ޙུ)
  4. ֦ுϓϩύςΟ /** * Returns the index of the last item

    in the list or -1 if the list is empty * * @sample test.collections.ListSpecificTest.lastIndex */ public val <T> List<T>.lastIndex: Int get() = this.size() - 1