Lasso Soft Inc. > Home


AuthorBil Corry
LicensePublic Domain
Posted03 Dec 2005
Updated03 Dec 2005
More by this author...


Standardizes the line endings in a string.

Sample Usage

[var:'test' = 'line_1\rline_2\nline_3\r\n']
Before: [output: $test,-encodeurl]

After: [output: (lp_string_linefeedSet:$test,'\r'),-encodeurl]

Source Code

Click the "Download" button below to retrieve a copy of this tag, including the complete documentation and sample usage shown on this page. Place the downloaded ".inc" file in your LassoStartup folder, restart Lasso, and you can begin using this tag immediately.


	-description='Standardizes the line endings in a string.',

	// usage: [lp_linefeed_set: $mystring, '\r'] to convert the line endings to \r
	// or optionally leave off the line ending for \r\n	

	local:'return' = string: #string;

	// default line ending is RFC line ending
	if: !(local_defined:'line_ending');
		local:'line_ending' = '\r\n';

	// first, standarize the line ending to \r

	// now replace with line ending requested
	return: @#return;




No comments

Please log in to comment

Subscribe to the LassoTalk mail list

LassoSoft Inc. > Home



©LassoSoft Inc 2015 | Web Development by Treefrog Inc | PrivacyLegal terms and Shipping | Contact LassoSoft