trim

From Bohemia Interactive Community
Revision as of 14:54, 23 November 2020 by R3vo (talk | contribs) (Created page with "{{Command|Comments= | arma3dev |Game name= |2.01|Game version= |gr1= Strings |GROUP1= | Trims a string. |DESCRIPTION= | string trim [chars, where]] |SYNTAX...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search
-wrong parameter ("arma3dev") defined!-[[:Category:Introduced with arma3dev version 2.01|2.01]]
Hover & click on the images for description

Description

Description:
Trims a string.
Groups:
Strings

Syntax

Syntax:
string trim [chars, where]]
Parameters:
string: String - String to be trimmed
chars: String - List of chars to be trimmed
where: Number - Can be:
  • 0 - Trimm at the beginning (left) and the end (right)
  • 1 - Only trimm at the beginning (left)
  • 2 - Only trimm at the end (right)
Return Value:
String - Trimmed string

Examples

Example 1:
"hewostring123" trim ["123hewo", 0]; // Returns "string"

Additional Information

See also:
select

Notes

Report bugs on the Feedback Tracker and/or discuss them on the Arma Discord or on the Forums.
Only post proven facts here! Add Note

[[Category:Introduced with arma3dev version 2.01]][[ Category: arma3dev: New Scripting Commands | TRIM]][[ Category: arma3dev: Scripting Commands | TRIM]]