mIRC Home    About    Download    Register    News    Help

Print Thread
#214914 19/08/09 05:51 PM
Joined: Feb 2006
Posts: 523
J
jaytea Offline OP
Fjord artisan
OP Offline
Fjord artisan
J
Joined: Feb 2006
Posts: 523
we have $instok $deltok $puttok etc.

can we please have analogues for strings and characters, $ins $del $put. eg:

$ins(abc,d,2) = adbc
$put(abc,d,2) = adc
$del(abc,2) = ac

sure there are methods involving $left/$right/$mid but those are uncomfortable and these just seem like such obviously useful additions

perhaps even a $rep and $rem if deemed applicable

at the very least could a delimiter of 0 in the token identifiers be used to achieve this behavior. currently 0 doesn't return anything useful

ie $puttok(abc,d,1,0) = d

but can't we let it = dbc

please please please consider this laugh


"The only excuse for making a useless script is that one admires it intensely" - Oscar Wilde
C
Champagne
Champagne
C
I support this idea.

C
Chessnut
Chessnut
C
It's always bugged me how there's no easy method to do simple things with strings such as those the OP mentioned. The work-arounds are ridiculously verbose.

Completely support this idea!

Joined: Sep 2005
Posts: 2,630
H
Hoopy frood
Offline
Hoopy frood
H
Joined: Sep 2005
Posts: 2,630
Great idea!

Joined: Nov 2004
Posts: 822
J
Hoopy frood
Offline
Hoopy frood
J
Joined: Nov 2004
Posts: 822
I def. support this idea.

Joined: Aug 2004
Posts: 7,168
R
Hoopy frood
Offline
Hoopy frood
R
Joined: Aug 2004
Posts: 7,168
Here's my vote.. not sure if it'll help, but, can't hurt.. right?

Joined: Mar 2006
Posts: 392
T
Pan-dimensional mouse
Offline
Pan-dimensional mouse
T
Joined: Mar 2006
Posts: 392
Probably one of the best idea's i've heard in a while.

Surprising how many support the idea


[02:16] * Titanic has quit IRC (Excess Flood)
Joined: Dec 2008
Posts: 1,483
Hoopy frood
Offline
Hoopy frood
Joined: Dec 2008
Posts: 1,483
Very good idea. I Support it too!

Joined: Oct 2005
Posts: 1,671
G
Hoopy frood
Offline
Hoopy frood
G
Joined: Oct 2005
Posts: 1,671
I HATE THIS IDEA!







J/K :P Those identifiers would be very useful.

-genius_at_work

Joined: Apr 2004
Posts: 755
M
Hoopy frood
Offline
Hoopy frood
M
Joined: Apr 2004
Posts: 755
Add me to the list of supporters !

Joined: Jan 2003
Posts: 2,125
Q
Hoopy frood
Offline
Hoopy frood
Q
Joined: Jan 2003
Posts: 2,125
Agreed, I've been wishing for $put() forever. The details could be discussed, for example there could be just one identifier ($put) incorporating the functionality of $ins and $del by allowing the 3rd parameter to be a range or by adding a 4th parameter, $mid-style.

E
Excalibur
Excalibur
E
Me too!


Link Copied to Clipboard