ACF Libraries: Difference between revisions
No edit summary |
|||
Line 23: | Line 23: | ||
== split.lua == | == split.lua == | ||
A lua library to work with tables. It takes a line like | |||
test123~bobo~foo~bar | |||
and splits it up and puts it in a table. With the following code you could take the line above and make it into a table like so | |||
strplit = require "split" | |||
t = strsplit("~", "test123~bobo~foo~bar") | |||
t would be a table with elements | |||
for a,b in ipairs(t) do print(a,b) end | |||
1 test123 | |||
2 bobo | |||
3 foo | |||
4 bar | |||
== validator.lua == | == validator.lua == | ||
== web_elements.lua == | == web_elements.lua == |
Revision as of 16:55, 5 November 2007
ACF Libraries
Because of using lua, a very small language, the need arises to build everything from scratch. This can lead to some confusion, apprehension, or just feeling overwhelmed. Here is documentation on what we have now in the form of libraries and common functions. We hope to build some more and use this information to get the juices flowing in regard to ACF.
Some of these are lua libs or ones written for ACF.
ed.lua
fs.lua
html.lua
join.lua
log_view.lua
service_controller.lua
service_model.lua
session.lua
split.lua
A lua library to work with tables. It takes a line like
test123~bobo~foo~bar
and splits it up and puts it in a table. With the following code you could take the line above and make it into a table like so
strplit = require "split"
t = strsplit("~", "test123~bobo~foo~bar")
t would be a table with elements
for a,b in ipairs(t) do print(a,b) end
1 test123
2 bobo
3 foo
4 bar