1 string.byteAt
<string.byteAt>
<text /> !
<position /> !
</string.byteAt>
Arguments | |||||
---|---|---|---|---|---|
Name | Type | Required | Unique | Nullable | Description |
Etext | string | ||||
Eposition | integer |
Returns | |
---|---|
Type | Description |
string | Returns the byte of the indicated position. |
Exceptions
requires 2 arguments, received: ...
The 2 entry parameters has not been specified.
java.lang.String index out of range: ...
The position indicated is out rank or is negative or is greater than the lenght of the text.
invalid number ...
The position indicated is not a number.
String contained in variable and position expressed through integer.
<xsql-script name='byteAt_sample1'> <body> <set name='word'>hola</set> <println><string.charAt><word/>0</string.charAt></println> </body> </xsql-script>
Returns the byte of the string contained in the variable word, which is found in the position indicated with the constant value 0.
h
String contained in variable and position expressed through variable.
<xsql-script name='byteAt_sample2'> <body> <set name='word'>hola</set> <set name='position'>3</set> <println><string.charAt><word/><position/></string.charAt></println> </body> </xsql-script>
Returns the byte of the string contained in the variable word, which is found in the position contained in the variable position.
a