Home Contents | # string.rawsplit | String | Core4 Lua Commands

## SYNOPSIS

result = string.rawsplit(str, pattern);

## DESCRIPTION

Splits the string str at the delimiters given by pattern.
This function does not do any special character processing as gsub would.

## RETURN VALUE

Returns a table that contains a list of all sections that the original string was cut into.
Empty strings before the first delimiter or after the last delimiter are included in the result.

## ERRORS

Both arguments must be strings, or an error is thrown.

## EXAMPLE

>
tbl = string.rawsplit(";A;B;C;", ";")
>
for k,v in pairs(tbl) do print(k,v) end
1 2 A 3 B 4 C 5

## SEE ALSO

string.rawfind