Lasso Soft Inc. > Home

[Bytes->ImportString]

[Bytes->ImportString] imports a string into the byte stream converting each character using the desired character encoding. The tag requires two parameters, the data to be imported and the character set which should be used to encode that data.

  • Syntax
  • Parameters
<?LassoScript
Variable: 'ByteStream' = (Bytes: 1024, 256);
$ByteStream->(ImportString: 'String', 'Encoding');
...
?>
Required Parameters
Byte Stream The byte stream to be operated on.
Data The data to be imported into the byte stream.
Encoding The desired character encoding for the string, such as ISO-8859-1, UTF-8. or any character set supported by the ICU Unicode library.
Examples

To import a string into a bytes stream:

Use the [Bytes->ImportString] tag. The following example imports a string using ISO-8859-1 encoding.

[Var:'Bytes'=(Bytes: 'This is a string')]
[$Bytes->(ImportString: 'This is some more string', 'ISO-8859-1')]
Tag Link [Bytes->ImportString] Category Bytes
Type Member Data Source Any
Support Preferred Version 7.0
Output Type None Security None
Implementation LCAPI Sets Lasso 8.5, Lasso 8.0, Lasso 7.0

Please note that periodically LassoSoft will go through the notes and may incorporate information from them into the documentation. Any submission here gives LassoSoft a non-exclusive license and will be made available in various formats to the Lasso community.

LassoSoft Inc. > Home

 

 

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