diff options
author | Hans Hagen <pragma@wxs.nl> | 2007-08-20 10:21:00 +0200 |
---|---|---|
committer | Hans Hagen <pragma@wxs.nl> | 2007-08-20 10:21:00 +0200 |
commit | deecfe09c774d4c2835f6999b2cdd9ca07e9bdae (patch) | |
tree | c921185fc4f848363c7d2ebf48a24e575c8194fe /tex/context/base/l-string.lua | |
parent | 14fbfde2ad32d2fe4a831aa9007877e5cb5764be (diff) | |
download | context-deecfe09c774d4c2835f6999b2cdd9ca07e9bdae.tar.gz |
stable 2007.08.20 10:21
Diffstat (limited to 'tex/context/base/l-string.lua')
-rw-r--r-- | tex/context/base/l-string.lua | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/tex/context/base/l-string.lua b/tex/context/base/l-string.lua index 9b594ff8a..9940de9b2 100644 --- a/tex/context/base/l-string.lua +++ b/tex/context/base/l-string.lua @@ -305,3 +305,15 @@ end --~ print(is_number("+0.1")) --~ print(is_number("-.1")) --~ print(is_number("+.1")) + +function string:split_settings() -- no {} handling, see l-aux for lpeg variant + if self:find("=") then + local t = { } + for k,v in self:gmatch("(%a+)=([^%,]*)") do + t[k] = v + end + return t + else + return nil + end +end |