Skip to content

davidm/lua-stringlua

master
Switch branches/tags

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

Latest commit

 

Git stats

Files

Permalink
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

No packages published

Languages