Search
 
SCRIPT & CODE EXAMPLE
 

RUST

pause rust

use std::io;
use std::io::prelude::*;

fn pause() {
    let mut stdin = io::stdin();
    let mut stdout = io::stdout();

    // We want the cursor to stay at the end of the line, so we print without a newline and flush manually.
    write!(stdout, "Press any key to continue...").unwrap();
    stdout.flush().unwrap();

    // Read a single byte and discard
    let _ = stdin.read(&mut [0u8]).unwrap();
}

fn main() {
    // Do some stuff
    pause();
}
Comment

PREVIOUS NEXT
Code Example
Rust :: count matches with regex 
Rust :: rust argv 
Rust :: create a new rust project folder with cargo 
Rust :: how to convert string to i32 in rust 
Rust :: How to make Rust panic ? 
Rust :: rust•armanriazi•concept•semantic 
Rust :: floor float rust 
Rust :: armanriazi•rust•concept•dynamic•dispatch 
Rust :: armanriazi•rust•error•the trait `Binary` is not implemented for `f64` 
Rust :: rust•armanriazi•concept•borrowchecker 
Rust :: rust•armanriazi•unwrap 
Rust :: allow dead code 
Rust :: armanriazi•rust•concept•memoization•lazy•evaluation 
Rust :: how to get public addres from private key solana cli 
Rust :: execution duration 
Rust :: split text on multiple separators and put into a list 
Lua :: roblox how to get random object from a table 
Lua :: roblox make region 
Lua :: roblox on touch script 
Lua :: conda find package version 
Lua :: how to check if a sting incules something roblox 
Lua :: roblox destroy game script 
Lua :: lua how to add something to a table 
Lua :: Tool script example for lua 
Lua :: roblox script to create brick 
Lua :: lua pairs 
Lua :: In range loop 
Matlab :: matlab measure time 
Matlab :: matlab symbolic roots 
Basic :: git token 
ADD CONTENT
Topic
Content
Source link
Name
9+1 =