I was looking for a way to insert a string into another, and have not
really found anything...

Is this the best way?  I don't really like it......

var str1 = "hello friend";
var str2 = "my "

str1.substr(0, 6) + str2 + str1.substr(6, str1.length);
=> "hello my friend"

-patrick

-- 
You received this message because you are subscribed to the Google Groups 
"Prototype & script.aculo.us" group.
To post to this group, send email to prototype-scriptacul...@googlegroups.com.
To unsubscribe from this group, send email to 
prototype-scriptaculous+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/prototype-scriptaculous?hl=en.

Reply via email to