Lee Wilmott
(Starting to like KiXtart)
2002-11-27 11:40 PM
Join() Function Enhancement

I would like to see an optional third parameter in the Join() function.

This could specify the number of elements, from the given array, that should be concatenated into the string.

Not only would I find this very helpful indeed, but it would also work similarly to its sister function Split().

Lee


Mordac85
(Fresh Scripter)
2002-12-20 12:11 AM
Re: Join() Function Enhancement

Excellent idea! I'm working around a similar problem now. Maybe an option to define the starting and ending element#?

LonkeroAdministrator
(KiX Master Guru)
2002-12-20 12:13 AM
Re: Join() Function Enhancement

oh, this wasn't answered yet.

check out: http://www.scriptlogic.com/KiXtart/DevReport.asp

it's in 4.20!


**DONOTDELETE**
(Lurker)
2002-12-20 05:04 AM
Re: Join() Function Enhancement

Yes, excellent idea. I believe it was originally suggested via the JOIN() UDF in January, 2002.

here is the UDF:

http://www.scriptlogic.com/Kixtart/FunctionLibrary_ViewFunction.aspx?ID=Join

-Brian


Howard Bullock
(KiX Supporter)
2002-12-20 05:10 AM
Re: Join() Function Enhancement

Personally, I think that this enhancment would not be necessary if we could get an ARRAY slice instead. The slice would permit you to JOIN the third through sixth elements of an array not just elements zero to two.

The old JOIN would work just fine.

$a = Join($Array[3-6], delimiter)

reference:Array Slice

[ 20. December 2002, 05:11: Message edited by: Howard Bullock ]


LonkeroAdministrator
(KiX Master Guru)
2002-12-20 05:12 AM
Re: Join() Function Enhancement

hoby, what is done, is done... right?

Howard Bullock
(KiX Supporter)
2002-12-20 05:13 AM
Re: Join() Function Enhancement

Just voicing MHO. [Smile]