reduce number of gsub calls for text variable substitutions #4

Merged
Sokomine merged 1 commits from :trade_list into trade_list 2021-06-23 04:58:59 +02:00
Collaborator

Use lua feature that allows to specify table with substitutions to
string.gsub()

Use lua feature that allows to specify table with substitutions to string.gsub()
whosit added 1 commit 2021-06-23 01:54:08 +02:00
Use lua feature that allows to specify table with substitutions to
string.gsub()
Owner

Ah yes. Nice idea. Wasn't aware how..capable...the Lua functions were in that regard. Nice :-)

Ah yes. Nice idea. Wasn't aware how..capable...the Lua functions were in that regard. Nice :-)
Sokomine merged commit 4ab2ee03f1 into trade_list 2021-06-23 04:58:59 +02:00
Author
Collaborator

You can also use a function for substitution argument - it will be called with each matched substring and can decide arbitrarily what to do, if you need some complex logic there.

You can also use a function for substitution argument - it will be called with each matched substring and can decide arbitrarily what to do, if you need some complex logic there.
Sign in to join this conversation.
No reviewers
No Label
No Milestone
No project
No Assignees
2 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: Sokomine/yl_speak_up#4
No description provided.