len(a: list)
Return type: integer
len()
-- string list places: Mumbai, New York, Bangalore
-- integer length(a):
string list a:
len(a)
;; This will show the length of the
;; list `places` defined above
-- ftd.integer: $length(a = $places)
color: $inherited.colors.text
ftd.append($a: <any> list, v: <any>)️
Return type: void
fastn
function that will append a value v
of any type
to the end of the given mutable list a
of same type as v
.append()
-- string list $some-list:
-- void append-fn(a,v):
string list $a:
string v:
ftd.append(a, v);
-- ftd.column:
width: fill-container
color: $inherited.colors.text
spacing.fixed.px: 5
-- display-text: Append text
$on-click$: $append-fn($a = $some-list, v = fifthtry)
-- display-list-item: $val
$loop$: $some-list as $val
-- end: ftd.column
ftd.insert_at($a: <any> list, v: <any>, num: integer)
fastn
function that will insert a value v
of any type
at the index num
in the given mutable list a
of same type as v
.insert_at()
-- void insert-at(a,v,num):
string list $a:
string v:
integer num:
ftd.insert_at(a, v, num);
-- string list $alphabets: A, B, C, D
-- ftd.column:
width: fill-container
color: $inherited.colors.text
spacing.fixed.px: 5
-- display-text: Insert Fifthtry at 2nd index
$on-click$: $insert-at($a = $alphabets, v = Fifthtry, num = 2)
-- display-list-item: $val
$loop$: $alphabets as $val
-- end: ftd.column
ftd.delete_at($a: <any> list, v: integer)
fastn
function that will delete the value from index num
from the given mutable list a
.delete_at()
-- void delete-at(a,num):
string list $a:
integer num:
ftd.delete_at(a, num);
-- string list $places: Bangalore, Mumbai, NewYork, Indore, Bangkok
-- ftd.column:
width: fill-container
color: $inherited.colors.text
spacing.fixed.px: 5
-- display-text: Delete Value from 1st index
$on-click$: $delete-at($a = $places, num = 1)
-- display-list-item: $val
$loop$: $places as $val
-- end: ftd.column
ftd.clear($a: <any> list)
fastn
function that will clear the given mutable list a
.clear()
-- string list $palindromes: dad, bob, racecar
-- void clear-fn(a):
string list $a:
ftd.clear(a);
-- ftd.column:
width: fill-container
spacing.fixed.px: 5
-- display-text: Click to Clear list
$on-click$: $clear-fn($a = $palindromes)
-- display-list-item: $val
$loop$: $palindromes as $val
-- end: ftd.column
enable_dark_mode()
fastn
function. This function enables
the dark mode.enable_dark_mode()
-- void set-dark():
enable_dark_mode()
-- ftd.text: Dark Mode
$on-click$: $set-dark()
;; Alternative way
-- ftd.text: Click to set Dark Mode
$on-click$: $ftd.enable-dark-mode()
enable_light_mode()
fastn
function. This function enables
the light mode.enable_light_mode()
-- void set-light():
enable_light_mode()
-- ftd.text: Light Mode
$on-click$: $set-light()
;; Alternative way
-- ftd.text: Click to set Light Mode
$on-click$: $ftd.enable-light-mode()
enable_system_mode()
fastn
function. This function enables
the system mode.enable_system_mode()
-- void set-system():
enable_system_mode()
-- ftd.text: System Mode
$on-click$: $set-system()
;; Alternative way
-- ftd.text: Click to set System Mode
$on-click$: $ftd.enable-system-mode()
copy-to-clipboard(text: string)
fastn
function. This function enables
copy content in clipboard.copy-to-clipboard()
-- ftd.text: Click to Copy ⭐️
$on-click$: $ftd.copy-to-clipboard(a = ⭐)
color: $inherited.colors.text
border-color: $red-yellow
border-width.px: 2
padding.px: 10
toggle($a: bool)
a
to this function.toggle()
-- boolean $b: false
-- ftd.column:
color: $inherited.colors.text
width: fill-container
spacing.fixed.px: 10
-- display-boolean: $b
-- display-text: Click to toggle
$on-click$: $ftd.toggle($a = $b)
-- end: ftd.column
increment($a: integer)
a
to this function.increment()
-- integer $x: 1
-- ftd.column:
color: $inherited.colors.text
width: fill-container
spacing.fixed.px: 10
-- display-integer: $x
-- display-text: Click to increment by 1
$on-click$: $ftd.increment($a = $x)
-- end: ftd.column
increment-by($a: integer, v: integer)️
v
which is passed as argument a
to this function.increment-by()
-- integer $z: 1
-- ftd.column:
color: $inherited.colors.text
width: fill-container
spacing.fixed.px: 10
-- display-integer: $z
-- display-text: Click to increment by 5
$on-click$: $ftd.increment-by($a = $z, v = 5)
-- end: ftd.column
set-bool($a: bool, v: bool)
v
which
is passed as argument a
to this function.set-bool()
-- boolean $b1: false
-- ftd.column:
color: $inherited.colors.text
width: fill-container
spacing.fixed.px: 10
-- display-boolean: $b1
-- display-text: Click to set the boolean as true
$on-click$: $ftd.set-bool($a = $b1, v = true)
-- end: ftd.column
set-string($a: string, v: string)
v
which is
passed as argument a
to this function.set-string()
-- string $s: Hello
-- ftd.column:
color: $inherited.colors.text
width: fill-container
spacing.fixed.px: 10
-- display-text: $s
-- display-text: Click to set the string as World
$on-click$: $ftd.set-string($a = $s, v = World)
-- end: ftd.column
set-integer($a: integer, v: integer)
v
which is
passed as argument a
to this function.set-integer()
-- integer $y: 1
-- ftd.column:
color: $inherited.colors.text
width: fill-container
spacing.fixed.px: 10
-- display-integer: $y
-- display-text: Click to set the integer as 100
$on-click$: $ftd.set-integer($a = $y, v = 100)
-- end: ftd.column
is_empty(a: any)
a
is null
or empty.is_empty()
-- optional string name:
-- string list names:
-- display-text: name is empty
if: { ftd.is_empty(name) }
-- display-text: There is no name in names
if: { ftd.is_empty(names) }
display-text: Renders text
-- ftd.color red-yellow:
light: red
dark: yellow
-- component display-text:
caption text:
-- ftd.text: $display-text.text
color: $inherited.colors.text
border-color: $red-yellow
border-width.px: 2
padding.px: 10
-- end: display-text
display-integer: Renders integer value
-- ftd.color red-yellow:
light: red
dark: yellow
-- component display-integer:
caption integer value:
-- ftd.integer: $display-integer.value
color: $inherited.colors.text
border-color: $red-yellow
border-width.px: 2
padding.px: 10
-- end: display-integer
display-boolean: Renders boolean value
-- ftd.color red-yellow:
light: red
dark: yellow
-- component display-boolean:
caption boolean value:
-- ftd.boolean: $display-boolean.value
color: $inherited.colors.text
border-color: $red-yellow
border-width.px: 2
padding.px: 10
-- end: display-boolean