Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[DOCS] EQL: Document string function #55086

Merged
merged 2 commits into from
Apr 13, 2020
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
39 changes: 39 additions & 0 deletions docs/reference/eql/functions.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ experimental::[]
* <<eql-fn-endswith>>
* <<eql-fn-length>>
* <<eql-fn-startswith>>
* <<eql-fn-string>>
* <<eql-fn-substring>>
* <<eql-fn-wildcard>>

Expand Down Expand Up @@ -337,6 +338,44 @@ field datatypes:
*Returns:* boolean or `null`
====

[discrete]
[[eql-fn-string]]
=== `string`

Converts a value to a string.

[%collapsible]
====
*Example*
[source,eql]
----
string(42) // returns "42"
string(42.5) // returns "42.5"
string("regsvr32.exe") // returns "regsvr32.exe"
string(true) // returns "true"

// null handling
string(null) // returns null
----

*Syntax*
[source,txt]
----
string(<value>)
----

*Parameters*

`<value>`::
(Required)
Value to convert to a string. If `null`, the function returns `null`.
+
If using a field as the argument, this parameter does not support the
<<text,`text`>> field datatype.

*Returns:* string or `null`
====

[discrete]
[[eql-fn-substring]]
=== `substring`
Expand Down