Lua 5.1 string library reimplemented in Lua
davidm/lua-stringlua
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
master
Could not load branches
Nothing to show
Could not load tags
Nothing to show
{{ refName }}
default
Name already in use
A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
Code
-
Clone
Use Git or checkout with SVN using the web URL.
Work fast with our official CLI. Learn more.
- Open with GitHub Desktop
- Download ZIP
Sign In Required
Please sign in to use Codespaces.
Launching GitHub Desktop
If nothing happens, download GitHub Desktop and try again.
Launching GitHub Desktop
If nothing happens, download GitHub Desktop and try again.
Launching Xcode
If nothing happens, download Xcode and try again.
Launching Visual Studio Code
Your codespace will open once ready.
There was a problem preparing your codespace, please try again.
Latest commit
Git stats
Files
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
The following module (stringlua.lua) partially reimplements Lua's string library (mainly `string.match` and `string.find`) in Lua 5.1. This is a fairly direct port of [lstrlib.c] to Lua. Reimplementing these in Lua provides a number of generalizations and possible applications: The pattern matching library can be extended in Lua The pattern matching can match not just strings but also to arrays of chars and arrays of arbitrary values, including arrays backed by metamethods. The filearray.lua example included in the appendix allows a large file to be accessed via an array interface, which can then be matched by these `string.find`/`string.match` functions, without ever loading the entire file into memory at once. A few examples are given in the test suite (test.lua). http://lua-users.org/wiki/StringLibraryInLua MIT License
About
Lua 5.1 string library reimplemented in Lua
Resources
Stars
Watchers
Forks
Packages 0
No packages published