Skip to content

Instantly share code, notes, and snippets.

View sfeatherstone's full-sized avatar

Simon Featherstone sfeatherstone

View GitHub Profile
@sfeatherstone
sfeatherstone / ArrayCat.kt
Last active June 21, 2018 13:39
Exploring different ways to add/concatenate two arrays in Kotlin
//Copy using arraycopy
fun catTwoIntArrays1(array1 :IntArray, array2 :IntArray) : IntArray {
val newArray = IntArray(array1.size + array2.size)
System.arraycopy(array1, 0, newArray, 0 , array1.size)
System.arraycopy(array2, 0, newArray, array1.size , array2.size)
return newArray
}
//Copy using for loops
fun catTwoIntArrays2(array1 :IntArray, array2 :IntArray) : IntArray {
{
"accountIDVStatus":"PASS",
"creditReportInfo":{
"score":547,
"scoreBand":4,
"clientRef":"CS-SED-655426-708782",
"status":"MATCH",
"maxScoreValue":700,
"minScoreValue":0,
"monthsSinceLastDefaulted":-1,