Hi all,
I'm looking for a tacit version of stringreplace verb, in order to increase
performance.
My solution, making just a single replacement, is:
NB.*sr v replace a substring inside a string
NB. usage: (oldsubstr;newsubstr) sr string
sr=: 13 : '(#>{:x)}. ; ({:x) , each (<:#>{.x)}. each ((>{.x) E. (>{.x),y)
<;._1 (>{.x),y'
The sequence of operations here is search-cut-box-replace-raze.
Can you help to improve it?
Thank you,
Lorenzo Tomei
--
View this message in context:
http://www.nabble.com/tacit-stringreplace-tp20476004s24193p20476004.html
Sent from the J Programming mailing list archive at Nabble.com.
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm