in reply to Re: Convert string to variable
in thread Convert string to variable
For normal line length strings the difference is of the order of a few micro-seconds: nothing to bother with except in an inner loop that is executed thousands of times a second. Readability and personal aesthetics is where it is at. Personally I'd go with the single regex version, at least partly because I'm accustomed to doing it that way and so it looks natural to me. YMMV and I wouldn't be upset to see the two regex variant (on two lines).
|
|---|