diff options
author | Hans Hagen <pragma@wxs.nl> | 2014-08-27 12:34:00 +0200 |
---|---|---|
committer | Hans Hagen <pragma@wxs.nl> | 2014-08-27 12:34:00 +0200 |
commit | 7eb8593f39b61673c90d12c2fc590933cedf3db0 (patch) | |
tree | ac058c5e9596f806edfb03969fc39764e33d391e /tex/context/base/util-tab.lua | |
parent | 236b439da00fe0baaf9d7ad6ce684ecd6109555c (diff) | |
download | context-7eb8593f39b61673c90d12c2fc590933cedf3db0.tar.gz |
beta 2014.08.27 12:34
Diffstat (limited to 'tex/context/base/util-tab.lua')
-rw-r--r-- | tex/context/base/util-tab.lua | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/tex/context/base/util-tab.lua b/tex/context/base/util-tab.lua index f9e9b318d..077c90643 100644 --- a/tex/context/base/util-tab.lua +++ b/tex/context/base/util-tab.lua @@ -98,6 +98,17 @@ function tables.removevalue(t,value) -- todo: n end end +function tables.replacevalue(t,oldvalue,newvalue) + if oldvalue and newvalue then + for i=1,#t do + if t[i] == oldvalue then + t[i] = newvalue + -- replace all, so no: return + end + end + end +end + function tables.insertbeforevalue(t,value,extra) for i=1,#t do if t[i] == extra then |