Place the byte in a defined position of an array byte.
1 byte.setByteAt
<byte.setByteAt>
<data /> !
<position /> !
<character /> !
</byte.setByteAt>
Arguments | |||||
---|---|---|---|---|---|
Name | Type | Required | Unique | Nullable | Description |
Edata | byte[] | String of bytes. | |||
Eposition | integer | Position. | |||
Echaracter | integer | Character. |
Returns | |
---|---|
Type | Description |
Integer | Returns the inserted character, in integer format, decimal code of the character. If the receiverd value is null, immediately it will return null as result. |
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.