zackster
02/22/2022, 8:33 PMdeactivateduser
02/22/2022, 8:42 PMdeactivateduser
02/22/2022, 8:47 PMDaniel Mejia
02/22/2022, 9:08 PMN-1
, in other words, I do not need the remainder. Is there less memory used OR speed gain if the remainder is never split to array items?zackster
02/22/2022, 9:10 PMDaniel Mejia
02/22/2022, 9:10 PMzackster
02/22/2022, 9:11 PMAdam Cameron
would be a neat extension to ListToArrayNo. Not unless Adobe do it first. Stop implementing shit that's different from CFML. And given you are apparently so under resourced that you can't do things like keep your dependencies up to date... stop doing anything that isn't pressing.
zackster
02/22/2022, 9:43 PMAdam Cameron
zackster
02/22/2022, 9:44 PMAdam Cameron
Adam Cameron
zackster
02/22/2022, 9:45 PMzackster
02/22/2022, 9:45 PMAdam Cameron
Adam Cameron
Adam Cameron
zackster
02/22/2022, 9:46 PMzackster
02/22/2022, 9:47 PMAdam Cameron
Adam Cameron
zackster
02/22/2022, 9:49 PMAdam Cameron
Adam Cameron
zackster
02/22/2022, 9:50 PMAdam Cameron
Adam Cameron
zackster
02/22/2022, 9:57 PMDaniel Mejia
02/22/2022, 10:32 PMAdam Cameron
zackster
02/22/2022, 10:53 PMzackster
02/22/2022, 10:56 PMAdam Cameron
s = "a|b|c|d|e|f"
writeDump(s.split("\|", 2)) // ["a", "b|c|d|e|f"]
Daniel Mejia
02/23/2022, 2:09 AMDaniel Mejia
02/23/2022, 2:09 AMelpete
02/23/2022, 5:16 AMsplit
drops down to Java’s String
class.elpete
02/23/2022, 5:17 AMArray[]
and not a CFML array. I usually use arraySlice( arr, 1 )
to then convert it back to a CFML array.elpete
02/23/2022, 5:18 AMAdam Cameron
someFunction(obj)
is not the same as calling obj.someMethod()
. someFunction
is a discrete implementation, and obj
can be any type that it chooses to support, and it will handle type coercion / conversion internally. With someMethod
it is part of the implementation of the class of the object it's called on. So CFML functions will take a Java array and internally convert it to something it can work with; however one can't hope to call one of CFML's array implementation methods on a Java array because they're two different things.
All CFMLers ought to know this, and it should not come as a surprise.Daniel Mejia
02/23/2022, 9:09 PMNative Array (java.lang.String[])
a = "1,3,3,4,5"
b = a.split(",") // OK - returns native array "java"
/****** Which methods work? ******/
c = b.slice(1) // No matching Method/Function for [Ljava.lang.String
c = arraySlice(b,1) // OK
c = b.avg() // No matching Method/Function for [Ljava.lang.String
c = arrayAvg(b) // ok
leftbower
02/23/2022, 11:39 PMelpete
02/24/2022, 2:27 AM