gettoken() - support for empty separator

Features wanted...
Post Reply
highend
Posts: 13327
Joined: 06 Feb 2011 00:33
Location: Win Server 2022 @100%

gettoken() - support for empty separator

Post by highend »

Let's use an example:

Code: Select all

	$chars = "1234567890abcdefghijklmnopqrstuvwxyz";
	text gettoken($chars, 4, "");
separator is set to "" -> each char is separated

So the expected output would be "4".

I know there is substr() but whenever I stumble upon this thing
I'll always try it with gettoken() - it feels way more natural... -> I fail ;)
One of my scripts helped you out? Please donate via Paypal

admin
Site Admin
Posts: 60588
Joined: 22 May 2004 16:48
Location: Win8.1 @100%, Win10 @100%
Contact:

Re: gettoken() - support for empty separator

Post by admin »

OK, done. 8)

highend
Posts: 13327
Joined: 06 Feb 2011 00:33
Location: Win Server 2022 @100%

Re: gettoken() - support for empty separator

Post by highend »

Thanks! :tup:
One of my scripts helped you out? Please donate via Paypal

Post Reply