Daniel brought up on IRC that it might be useful for string_replace() to be
able
to replace N chars from string 1 with a substr of string 2.
I wrote string_replace() to how I understood Perl5 semantics, where
if you wanted to only use a substr of the replacement string AS the
replancement, you'd have to nest substr.

Example:

my $orig =  "123123"";
my $rep = "456456";

If I want orig to be 123456 I have to do

substr($orig, 3, 3, substr($rep, 0, 3) );

BUT... for the string_replace internal API it might still be worthwhile
for performance to add additional semantics so we don't have to
next stuff for performance.

I'm open to adding a dest_len arg or something, but consider this a
request for comments on any additional string semantics that we might
be missing that I'm unaware of.

-Melvin Smith

IBM :: Atlanta Innovation Center
[EMAIL PROTECTED] :: 770-835-6984

Reply via email to