src/t_csv_l.c
static int
lt_csv_Split( lua_State *L )
{
	const char __attribute__ ((unused)) *str = luaL_checkstring( L, 1 );
	const char __attribute__ ((unused)) *dlm = luaL_checkstring( L, 2 );
	if (2==lua_gettop( L ))
		lua_pushboolean( L, lua_toboolean( L, 3 ) ); // don't strip delimiter
	lua_pushinteger( L, 0 );                // str iterator
	lua_pushinteger( L, 0 );                // token counter
	lua_pushcclosure( L, &t_csv_split, 5 );
	return 1;
}
/**--------------------------------------------------------------------------
 * Function to split a string by a delimiter
 * \param   L       Lua state.
 * \lparam  string  Text string to split.
 * \lparam  string  Delimiter string.
 * \lreturn func    Iterator function that returns the split tokens one by one.
 * \return  int     # of values pushed onto the stack.
 * --------------------------------------------------------------------------*/
Function to split a string by a delimiter
\param   L       Lua state.
\lparam  string  Text string to split.
\lparam  string  Delimiter string.
\lreturn func    Iterator function that returns the split tokens one by one.
\return  int     # of values pushed onto the stack.
Function to split a string by a delimiter \ param L Lua state . \ lparam string Text string to split . \ lparam string Delimiter string . \ lreturn func Iterator function that returns the split tokens one by one . \ return int # of values pushed onto the stack .
static int
lt_csv_Split( lua_State *L )
{
	const char __attribute__ ((unused)) *str = luaL_checkstring( L, 1 );
	const char __attribute__ ((unused)) *dlm = luaL_checkstring( L, 2 );
	if (2==lua_gettop( L ))
		lua_pushboolean( L, lua_toboolean( L, 3 ) ); 
	lua_pushinteger( L, 0 );                
	lua_pushinteger( L, 0 );                
	lua_pushcclosure( L, &t_csv_split, 5 );
	return 1;
}
static int lt_csv_Split ( lua_State * L ) { const char __attribute__ ( ( unused ) ) * str = luaL_checkstring ( L , 1 ) ; const char __attribute__ ( ( unused ) ) * dlm = luaL_checkstring ( L , 2 ) ; if ( 2 == lua_gettop ( L ) ) lua_pushboolean ( L , lua_toboolean ( L , 3 ) ) ; lua_pushinteger ( L , 0 ) ; lua_pushinteger ( L , 0 ) ; lua_pushcclosure ( L , & t_csv_split , 5 ) ; return 1 ; }
Function to split a string by a delimiter
 \param   L       Lua state.
Function to split a string by a delimiter \ param L Lua state .
// don't strip delimiter // str iterator // token counter