summaryrefslogtreecommitdiff
path: root/luaotfload.dtx
diff options
context:
space:
mode:
Diffstat (limited to 'luaotfload.dtx')
-rw-r--r--luaotfload.dtx16
1 files changed, 11 insertions, 5 deletions
diff --git a/luaotfload.dtx b/luaotfload.dtx
index 77aec84..1464b05 100644
--- a/luaotfload.dtx
+++ b/luaotfload.dtx
@@ -503,12 +503,18 @@ end
%
%
% \begin{macrocode}
-function table.swaphash(h) -- needs another name
- local r = { }
- for k,v in next, h do
- r[v] = string.lower(string.gsub(k," ",""))
+function table.reversed(t)
+ if t then
+ local tt, tn = { }, #t
+ if tn > 0 then
+ local ttn = 0
+ for i=tn,1,-1 do
+ ttn = ttn + 1
+ tt[ttn] = t[i]
+ end
+ end
+ return tt
end
- return r
end
% \end{macrocode}
%