你当前正在访问 Microsoft Azure Global Edition 技术文档网站。 如果需要访问由世纪互联运营的 Microsoft Azure 中国技术文档网站,请访问 https://docs.azure.cn

reverse()

Applies to: ✅ Microsoft FabricAzure Data ExplorerAzure MonitorMicrosoft 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