Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
B
blockcode
Project overview
Project overview
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Packages
Packages
Container Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Eben Blaisdell
blockcode
Commits
c1915413
Commit
c1915413
authored
May 07, 2018
by
Eben Blaisdell
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
dev change
parent
d45eb472
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
3 deletions
+3
-3
users/EbMastaJ/strats/mapSweepNormalize.lua
users/EbMastaJ/strats/mapSweepNormalize.lua
+3
-3
No files found.
users/EbMastaJ/strats/mapSweepNormalize.lua
View file @
c1915413
...
@@ -90,7 +90,7 @@ end
...
@@ -90,7 +90,7 @@ end
-- Split text into a list consisting of the strings in text,
-- Split text into a list consisting of the strings in text,
-- separated by strings matching delimiter (which may be a pattern).
-- separated by strings matching delimiter (which may be a pattern).
-- example: strsplit(",%s*", "Anna, Bob, Charlie,Dolores")
-- example: strsplit(",%s*", "Anna, Bob, Charlie,Dolores")
-- due to http://lua-users.org/wiki/SplitJoin
-- due
in large part
to http://lua-users.org/wiki/SplitJoin
function
strsplit
(
delimiter
,
text
)
function
strsplit
(
delimiter
,
text
)
local
list
=
{}
local
list
=
{}
local
pos
=
1
local
pos
=
1
...
@@ -100,10 +100,10 @@ function strsplit(delimiter, text)
...
@@ -100,10 +100,10 @@ function strsplit(delimiter, text)
while
1
do
while
1
do
local
first
,
last
=
string.find
(
text
,
delimiter
,
pos
)
local
first
,
last
=
string.find
(
text
,
delimiter
,
pos
)
if
first
then
-- found?
if
first
then
-- found?
tinsert
(
list
,
string.sub
(
text
,
pos
,
first
-
1
))
t
able.
insert
(
list
,
string.sub
(
text
,
pos
,
first
-
1
))
pos
=
last
+
1
pos
=
last
+
1
else
else
tinsert
(
list
,
string.sub
(
text
,
pos
))
t
able.
insert
(
list
,
string.sub
(
text
,
pos
))
break
break
end
end
end
end
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment