Place the byte in a defined position of an array byte.
 

1 byte.setByteAt

<byte.setByteAt>
    <data /> !
    <position /> !
    <character /> !
</byte.setByteAt>

Exceptions

requires 3 values, received [...]

It has been specified an incorrect number of values.

index position request= .. size= ..

The position is greater than the length of the string.

Remarks

Accepts any type of data convertible to byte array as a value: a string, an array of bytes, a node (of a XML or HTML file), a BLOB (Binary Large Object) or a file.

Example

Place the character "o" in the position 0.

Copy
<xsql-script name='byte_setchar_sample1'>
    <body>
        <set name='m_data'>Hello world.</set>
        <println>
            <byte.setByteAt>
                <m_data />
                <number>0</number>
                <number>111</number>
            </byte.setByteAt>
        </println>
    </body>
</xsql-script>

The result is:

Copy
oello world.