From ad34f6ce333e1887baa78e19b3bae169de6cf44b Mon Sep 17 00:00:00 2001 From: rxi Date: Wed, 19 Mar 2014 13:02:31 +0000 Subject: [PATCH] Updated lume.split() in README.md --- README.md | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 3a098f4..a70d560 100644 --- a/README.md +++ b/README.md @@ -227,11 +227,12 @@ lume.deserialize("{1, 2, 3}") -- Returns {1, 2, 3} ``` ### lume.split(str [, sep]) -Splits the string `str` into words and returns a table of the sub strings. If -`sep` is provided the string will be split at any of the characters in `sep` -instead of on whitespace. +Returns an array of the words in the string `str`. If `sep` is provided then +consecutive delimiters are not grouped together and are deemed to delimit empty +strings. ```lua lume.split("One two three") -- Returns {"One", "two", "three"} +lume.split("a,b,,c", ",") -- Returns {"a", "b", "", "c"} ``` ### lume.trim(str [, chars])