-
Notifications
You must be signed in to change notification settings - Fork 0
str
ffredyk edited this page Jul 23, 2026
·
1 revision
String / Type Conversion
Unary — str <value>.
str <any>
Converts any value to its string representation. nil → "nil". Numbers → their decimal representation. Arrays → bracketed comma-separated elements. Booleans → "true" / "false". Code → "{ ... }". HashMaps → "[key, value, ...]".
Calls the ToString() method on the internal value representation. The format is designed to be human-readable and SQF-compatible.
str 42; // "42"
str 3.14; // "3.14"
str true; // "true"
str nil; // "nil"str [1, 2, 3]; // "[1, 2, 3]"
str ["a", "b"]; // "["a", "b"]"systemChat str _myVariable;
diag_log f"State: {str _state}";_msg = "Position: " + str _pos;
"Value is " + str _val;if (str _arr1 == str _arr2) then {
systemChat "Arrays have same content";
};ReadOnly — pure conversion, no side effects. Safe from any scheduler.
- format — formatted string with placeholders
- + — string concatenation
- parseNumber — reverse: string to number
- typeName — get type name string
- Getting Started
- Language Guide
- Type System
- Control Flow
- Functions & Code
- Strings & Text
- Arrays & Collections
- Concurrency
- Promise System
- Thread Safety
- Host API & Embedding
- CLI Tool
- Bytecode Reference
- Multiplayer
- Syntax Sugar
- Optimization Guide
- Benchmarks
- count
- select
- pushBack
- append
- deleteAt
- deleteRange
- resize
- reverse
- sort
- find
- in
- forEach
- freeze
- thaw
- isFrozen
- currentScheduler
- clientOwner
- allSchedulers
- schedulerName
- schedulerExists
- schedulerBudget
- setSchedulerBudget
- fiberCount
- readyFiberCount
- waitingFiberCount
- schedulerLoad
- sendTo