String: Difference between revisions
Jump to navigation
Jump to search
Lou Montana (talk | contribs) m (Some wiki formatting) |
Lou Montana (talk | contribs) m (Text replacement - "\{\{ *Wikipedia *\| *([-a-zA-Z0-9_#':%\/\\]+) *\| *([-a-zA-Z0-9_#':%\/\\ ]+) *\}\}" to "{{Link|https://en.wikipedia.org/wiki/$1|$2}}") |
||
(2 intermediate revisions by the same user not shown) | |||
Line 24: | Line 24: | ||
|- | |- | ||
! Encoding | ! Encoding | ||
| {{ | | {{Link|https://en.wikipedia.org/wiki/ASCII|ASCII}} | ||
| colspan="6" | {{ | | colspan="6" | {{Link|https://en.wikipedia.org/wiki/Unicode|Unicode}} | ||
|- | |- | ||
! {{ | ! {{Link|https://en.wikipedia.org/wiki/Code_page|Code page}} | ||
| product language defined | | product language defined | ||
| colspan="6" | {{ | | colspan="6" | {{Link|https://en.wikipedia.org/wiki/UTF-8|UTF-8}} | ||
|- | |- | ||
! "text" | ! "text" |
Latest revision as of 00:47, 24 February 2023
A string is a variable type that contains text. Possible length and characters depend on the game and its version.
Properties
OFP | ArmA | Arma 2 | Arma 2:OA | TKOH | Arma 3 (before v1.56) | Arma 3 (since v1.56) | |
---|---|---|---|---|---|---|---|
Max length | 2056 | No set limit | 9,999,999 to 10,000,000 (same as Array length) | ||||
Encoding | ASCII | Unicode | |||||
Code page | product language defined | UTF-8 | |||||
"text" | |||||||
'text' | |||||||
{text} |
Commands and Functions
Single quote limitation
Other than double quotes ("text"), single quotes ('text') do not seem to support tabs:
_string = "
";
copyToClipboard _string;
diag_log format ["%1 %2 %3 x%4x", toArray _string, toArray copyFromClipboard, toArray (_string select [0]), _string];
/*
return is good: "[9,10,9] [9,10,9] [9,10,9] x
x"
*/
_string = '
';
copyToClipboard _string;
diag_log format ["%1 %2 %3 x%4x", toArray _string, toArray copyFromClipboard, toArray (_string select [0]), _string];
/*
return: "[9,10] [9,10] [9,10] x
x" - second tab vanished
*/
Example courtesy of Rydygier
Examples
Quotes in Quotes
String Formats
Operators
The only basic operator to be used on strings is "plus". You can use "plus" to concatenate two strings.