Arma 3 Scripting

Command in Strings

trim

Also available as Markdown and JSON, or read the original wiki page.

Description

Trims a string.

Syntax

Syntax 1

trim stringValue

Parameters:

Returns: String - trimmed string

Syntax 2

string trim [chars, where]

Parameters:

Returns: String - trimmed string

Examples

Example 1

trim "        hello, how are you?  "; // returns "hello, how are you?"

Example 2

"hewosentence!123" trim ["3e1o2hw", 0]; // returns "sentence!"

See also

select