Search
 
SCRIPT & CODE EXAMPLE
 

RUST

stringify! in rust

// You can use it in a macro
macro_rules! foo {
	($a:ident) => {
    	println!("{}", stringify!($a))
    }
}

fn main() {
	foo!(hello); // prints `hello`
    
    // Also you can use it to convert an expression to a &str:
    let one_plus_one = stringify!(1 + 1);
	assert_eq!(one_plus_one, "1 + 1");
}
Comment

PREVIOUS NEXT
Code Example
Rust :: rust•armanriazi•error•[E0382]: use of moved value: `counter` value moved into closure here, in previous iteration of loop 
Rust :: armanriazi•rust•reference•vs•pointer 
Rust :: rust spinning rod animation in text 
Rust :: armanriazi•rust•clone•vs•copy 
Rust :: rust named tuple 
Rust :: armanriazi•rust•error•E0308•mismatched types 
Rust :: rust iterate over split 
Rust :: armanriazi•rust•error•E0277•`Point<{integer}, {float}` cannot be formatted using ` 
Rust :: rust lang unresolved import 
Rust :: armanriazi•rust•rc•vs•refcell 
Rust :: armanriazi•rust•nestedtypes 
Rust :: search in dir rust 
Rust :: rust array literal 
Lua :: lua string.split 
Lua :: how to choose a random item from a table lua 
Lua :: roblox kill brick script 
Lua :: roblox interpolate color 
Lua :: luau how to find value in table 
Lua :: lua roblox global variables 
Lua :: do while lua 
Lua :: vector2 roblox 
Lua :: lua oop 
Lua :: lua how to make a click to activate button 
Lua :: gun that shoot automaticly roblox 
Lua :: Ackermann function lua 
Lua :: lua table of alphabet 
Matlab :: repeat characters matlab 
Matlab :: sin in scilab 
Basic :: basic authentication bash 
Elixir :: elixir string concatination 
ADD CONTENT
Topic
Content
Source link
Name
1+5 =