-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Peter Aronoff
committed
Jul 16, 2015
1 parent
6efbacf
commit 538a678
Showing
10 changed files
with
69 additions
and
41 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
package = 'split' | ||
version = '1.0.0-1' | ||
source = { | ||
url = 'https://bitbucket.org/telemachus/split/downloads/split-v1.0.0-1.tar.gz', | ||
dir = 'split' | ||
} | ||
description = { | ||
summary = 'String split function and iterator for Lua', | ||
detailed = [[ | ||
A string split function and iterator for Lua since the string standard | ||
library doesn't come with one. | ||
]], | ||
homepage = 'https://bitbucket.org/telemachus/split', | ||
license = 'BSD 3-Clause', | ||
maintainer = 'Peter Aronoff <[email protected]>' | ||
} | ||
dependencies = { 'lua >= 5.1' } | ||
build = { | ||
type = 'builtin', | ||
modules = { | ||
split = 'src/split.lua', | ||
}, | ||
copy_directories = { 'doc' } | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
#!/usr/bin/env lua | ||
local t = require 'tapered' | ||
package.path = '../src/?.lua;' .. package.path | ||
local split = require 'split'.split | ||
|
||
local s, got | ||
|
||
s = 'fōö,bàr,bízz,bũzz' | ||
got = split(s, ',') | ||
t.is(#got, 4, "split('fōö,bàr,bízz,bũzz', ',') returns four items") | ||
t.is(got[1], 'fōö', "The first item is 'fōö'") | ||
t.is(got[2], 'bàr', "The second item is 'bàr'") | ||
t.is(got[3], 'bízz', "The third item is 'bízz'") | ||
t.is(got[4], 'bũzz', "The fourth item is 'bũzz'") | ||
|
||
s = 'ἄνδραἦμοιἦἔννεπεἦΜοῦσαἦπολύτροπον' | ||
got = split(s, 'ἦ') | ||
t.is(#got, 5, | ||
"split('ἄνδραἦμοιἦἔννεπεἦΜοῦσαἦπολύτροπον', 'ἦ') returns five items") | ||
t.is(got[1], 'ἄνδρα', "The first item is 'ἄνδρα'") | ||
t.is(got[2], 'μοι', "The second item is 'μοι'") | ||
t.is(got[3], 'ἔννεπε', "The third item is 'ἔννεπε'") | ||
t.is(got[4], 'Μοῦσα', "The fourth item is 'Μοῦσα'") | ||
t.is(got[5], 'πολύτροπον', "The fifth item is 'πολύτροπον'") |