Added base64 example. Lot of refactoring. (0.37.49)
This commit is contained in:
parent
85b8d37b23
commit
75538e6142
17 changed files with 439 additions and 45 deletions
29
examples/interactive/input_hidden_example.fun
Executable file
29
examples/interactive/input_hidden_example.fun
Executable file
|
|
@ -0,0 +1,29 @@
|
|||
#!/usr/bin/env fun
|
||||
|
||||
/*
|
||||
* This file is part of the Fun programming language.
|
||||
* https://fun-lang.xyz/
|
||||
*
|
||||
* Example: Demonstrate hidden input (no echo) for passwords.
|
||||
*
|
||||
* Added: 2026-01-02
|
||||
*/
|
||||
|
||||
#include <io/console.fun>
|
||||
|
||||
print("=== input_hidden() example ===")
|
||||
|
||||
c = Console()
|
||||
|
||||
username = c.ask("Username")
|
||||
password = c.ask_hidden("Password")
|
||||
|
||||
// Do not print the password; just show the username
|
||||
print(join(["Hello, ", username, "!"], ""))
|
||||
|
||||
/* Expected output:
|
||||
Username: hanez
|
||||
Password:
|
||||
=== input_hidden() example ===
|
||||
Hello, hanez!
|
||||
*/
|
||||
Loading…
Add table
Add a link
Reference in a new issue