Search
 
SCRIPT & CODE EXAMPLE
 

RUST

rust concatenate vectors

fn main() {
    let mut a = vec![1, 2, 3];
    let mut b = vec![4, 5, 6];

    a.append(&mut b);

    assert_eq!(a, [1, 2, 3, 4, 5, 6]);
    assert_eq!(b, []);
}
Comment

rust concatenate strings

let text1 = "hello".to_owned();
let text2 = text1 + " world";
println!("{}", text2);
Comment

rust concat

let s = concat!("test", 10, 'b', true); // concatenates string literals
assert_eq!(s, "test10btrue");
Comment

PREVIOUS NEXT
Code Example
Rust :: split rust 
Rust :: armanriazi•rust•Rc 
Rust :: armanriazi•rust•smartpointer•box•cons 
Rust :: rust initialize struct 
Rust :: create a new rust project folder with cargo 
Rust :: error handling rust 
Rust :: rust compiler 
Rust :: Repeat the given string exactly n times 
Rust :: rust•armanriazi•borrowchecker•borrow 
Rust :: hwllo world in rust 
Rust :: lifetime may not live long enough 
Rust :: $sce trust url 
Rust :: rust match wildcard 
Rust :: rust get items in a list 
Rust :: rust•armanriazi•slice•vs•char•vec 
Rust :: primitive data types in rust 
Lua :: Children Loop Roblox Lua 
Lua :: lua multiline comment 
Lua :: how to print hello in lua 
Lua :: open gui script 
Lua :: roblox studio mouse 
Lua :: how to get the player mouse in roblox studio 
Lua :: lua type of 
Lua :: how to access an index of a table lua 
Lua :: convert number to string lua 
Lua :: when do true loop on roblox lua 
Lua :: how to make a run in roblox lua 
Lua :: how to activate a command if someone wears a accessory in lua roblox 
Matlab :: if else in matlab 
Matlab :: SAVE TABLE IN MATLAB 
ADD CONTENT
Topic
Content
Source link
Name
6+4 =