reverse()
Applies to: ✅ Microsoft Fabric ✅ Azure Data Explorer ✅ Azure Monitor ✅ Microsoft Sentinel
Function reverses the order of the input string.
If the input value isn't of type string
, then the function forcibly casts the value to type string
.
Syntax
reverse(
value)
Learn more about syntax conventions.
Parameters
Name | Type | Required | Description |
---|---|---|---|
value | string |
✔️ | input value. |
Returns
The reverse order of a string value.
Examples
print str = "ABCDEFGHIJKLMNOPQRSTUVWXYZ"
| extend rstr = reverse(str)
Output
str | rstr |
---|---|
ABCDEFGHIJKLMNOPQRSTUVWXYZ | ZYXWVUTSRQPONMLKJIHGFEDCBA |
print ['int'] = 12345, ['double'] = 123.45,
['datetime'] = datetime(2017-10-15 12:00), ['timespan'] = 3h
| project rint = reverse(['int']), rdouble = reverse(['double']),
rdatetime = reverse(['datetime']), rtimespan = reverse(['timespan'])
Output
rint | rdouble | rdatetime | rtimespan |
---|---|---|---|
54321 | 54.321 | Z0000000.00:00:21T51-01-7102 | 00:00:30 |