Skip to content

File System

std:string are functions that operates on strings in Extron.

Functions

replace ( og_str, rep_str, new_str )

Replace all occurrences of a string in original_string with new_string.

import "std:string";
 
let original_string = "Hello, World!";
let new_string = replace(original_string, "World", "Extron");
print(new_string);
 
Console 
Hello, Extron!; 

to_string ( value )

Converts a value to a string.

import "std:string";
 
let value = 42;
let str = to_string(value);
print(typeof(str));
 
Console 
string 

to_chars ( string )

Converts a String to an array of characters.

import "std:string";
 
let value = "hello";
set value = to_chars(value);
print(value);
print(value[1]);
 
Console   
[h, e, l, l, o]     
e