SubString
Not available in this language yet.
SubString( value, start, [ length ] )
SubString( value, start, [ length ] )
SubString( value, start, [ length ] )
Not available in this language yet.
Not available in this language yet.
Not available in this language yet.
SubString( value, start, [ length ] )
Description
The SubString
function returns a portion of the value
string
beginning at the character start
position for length
characters
long.
Parameters
Argument | Type | Definition and Requirements |
---|---|---|
|
String |
The string having the subset returned. |
|
Integer |
The position in the source string where the |
|
Integer |
Optional - The number of code points to extract. The default returns
the remaining portion of the source string after beginning at |
Examples
The query below executes an array of independent SubString
operations
and returns the results in an array. The result array position matches
the execution array position. The first operation takes a source string
containing "ABCDEFGHIJK" and extracts a string starting at the 2
position for 3 characters. The resultant string "CDE" is placed in the
top position of the result array. The second operation uses the same
input string, but starts at the 1 position ("B") and extracts 6
characters("BCDEFG"). The third operations extracts the last 4
characters from the end of the source string.
System.out.println(
client.query(
Arr(
SubString("ABCDEFGHIJK",2,3),
SubString("ABCDEFGHIJK",1,6),
SubString("ABCDEFGHIJK",-4),
SubString("ABCDEFGHIJK",-3, 2)
)
).get());
Not available in this language yet.
Not available in this language yet.
Not available in this language yet.
Not available in this language yet.
Not available in this language yet.
Not available in this language yet.
Not available in this language yet.
[
"CDE",
"BCDEFH",
"HIJK",
"IJ"
]
Was this article helpful?
We're sorry to hear that.
Tell us how we can improve!
documentation@fauna.com
Thank you for your feedback!