NabeelScript Functions

String Functions

length

length("Hello, World!")

uppercase

uppercase("hello")

lowercase

lowercase("HELLO")

trim

trim("   Hello, World!   ")

replace

replace("Hello, World!", "Hello", "Hi")

Array Functions

push

arr = [1, 2, 3];
push(arr, 4)

pop

arr = [1, 2, 3];
pop(arr)

first

arr = [1, 2, 3];
first(arr)

last

arr = [1, 2, 3];
last(arr)

File Functions

read_file

content = read_file("input.txt");
print(content)

write_file

write_file("output.txt", "Hello, NabeelScript!")