-
Notifications
You must be signed in to change notification settings - Fork 0
toString
ffredyk edited this page Jul 23, 2026
·
1 revision
String
Unary — toString <array>.
toString <array> // array of character codes (integers)
Converts an array of character codes (integers) into a string. Each integer is interpreted as a Unicode code point. This is the reverse of toArray.
Iterates the array, casts each integer to char, and builds a new string. Non-integer values or values outside the valid char range may produce unexpected characters.
toString [65, 66]; // "AB"
toString [72, 101, 108, 108, 111]; // "Hello"
toString []; // "" (empty string)_newline = toString [10]; // line feed
_tab = toString [9]; // tab
_space = toString [32]; // space_original = "SQF";
_codes = toArray _original; // [83, 81, 70]
_restored = toString _codes; // "SQF"// Generate "ABC...Z"
_letters = [];
for "_i" from 65 to 90 do {
_letters pushBack _i;
};
_alphabet = toString _letters; // "ABCDEFGHIJKLMNOPQRSTUVWXYZ"_encode = {
params ["_str"];
_codes = toArray _str;
_shifted = [];
{ _shifted pushBack (_x + 1) } forEach _codes;
toString _shifted
};
_encoded = "hello" call _encode; // "ifmmp"ReadOnly — pure computation, returns new string. Safe from any scheduler.
- 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