Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save nag9s/b86e5638243c592ca977587f2dbeb58d to your computer and use it in GitHub Desktop.
Save nag9s/b86e5638243c592ca977587f2dbeb58d to your computer and use it in GitHub Desktop.
//String Manipulation
val str = orders.first
val a = str.split(",")
val orderId = a(0).toInt
a(1).contains("2013")
val orderDate = a(1)
orderDate.substring(0, 10)
orderDate.substring(5, 7)
orderDate.substring(11)
orderDate.replace('-', '/')
orderDate.replace("07", "July")
orderDate.indexOf("2")
orderDate.indexOf("2", 2)
orderDate.length
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment