Without using Regex, you can do this: function makeString tChar, n -- returns a string of n characters (tChar) -- no repeat loop! put cr into line n of m replace cr with tChar in m return m end makeString
-- Peter Peter M. Brigham pmb...@gmail.com http://home.comcast.net/~pmbrig On Feb 5, 2014, at 11:24 AM, Alex Tweedly wrote: > On 05/02/2014 15:06, Mike Kerner wrote: >> Alex's idea is also clever, but what if I am trying to repeat another >> character, like "#"? >> >> > > put replacetext( format("%30s", " "), " ", "x") into myVar > > (no promises for being the speediest solution - but still one line and no > library involved). > -- Alex. > > _______________________________________________ > use-livecode mailing list > use-livecode@lists.runrev.com > Please visit this url to subscribe, unsubscribe and manage your subscription > preferences: > http://lists.runrev.com/mailman/listinfo/use-livecode _______________________________________________ use-livecode mailing list use-livecode@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-livecode