diff options
| author | ruki <[email protected]> | 2015-05-02 20:12:39 +0800 |
|---|---|---|
| committer | ruki <[email protected]> | 2015-05-02 20:12:39 +0800 |
| commit | 6d4865a5c2c156ad812ecef9a7973c6a0375e7b4 (patch) | |
| tree | 0d4cba41d3b80c812d0f1cb64dc1045a5b96abb8 /xmake/scripts/base/utils.lua | |
| parent | 335840294ec2442d177358cc8e42c036d46401ac (diff) | |
print the menu
Diffstat (limited to 'xmake/scripts/base/utils.lua')
| -rw-r--r-- | xmake/scripts/base/utils.lua | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/xmake/scripts/base/utils.lua b/xmake/scripts/base/utils.lua index 59769c260..1c05fd480 100644 --- a/xmake/scripts/base/utils.lua +++ b/xmake/scripts/base/utils.lua @@ -23,8 +23,8 @@ -- define module: utils local utils = {} --- the trace function -function utils.trace(msg, ...) +-- the printf function +function utils.printf(msg, ...) print(string.format(msg, ...)) end @@ -45,5 +45,10 @@ function utils.warning(msg, ...) print("warning: " .. string.format(msg, ...)) end +-- ifelse, a? b : c +function utils.ifelse(a, b, c) + if a then return b else return c end +end + -- return module: utils return utils |
