Lasso Soft Inc. > Home

[ bytes->+ ]

Method

This method accepts either a bytes or a string object as a parameter on the right-hand side.

If the parameter is a bytes object, then this method concatenates the two bytes objects together, returning a new object.

If the parameter is a string object, then this method converts the parameter into bytes using UTF-8 encoding, then concatenates it to the target, returning a new object.

  • Syntax
Bytes Object+Bytes Object
Bytes Object+String Object
Examples
  • Beginner

To concatenate two bytes objects together:

Use the + (concatenation) method. The following object concatenates two bytes objects, returning a new object.

Code

local(t = bytes('rhino'), p=bytes('ceros'))
#t+#p

Result

rhinoceros

To concatenate a string object to a bytes object:

Use the + (concatenation) method. The following object concatenates a string object to the end of a bytes objects, converting the string into bytes using UTF-8 encoding, returning a new object.

Code

local(t = bytes('rhino'), p=string('ceros'))
#t+#p

Result

rhinoceros

Recent Comments

No Comments found

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