|
You are here |
ryanbigg.com | ||
| | | | |
grosser.it
|
|
| | | | | Diff is defined on Set, but not on Array, so we patch it in... (thanks to reto) Usage [1,2] ^ [2,3,4] == [1,3,4] Code class Array def ^(other) result = dup other.each{|e| result.include?(e) ? result.delete(e) : result.push(e) } result end unless method_defined?(:^) alias diff ^ unless method_defined?(:diff) end puts ([] ^ [1]).inspect # [1] puts... | |
| | | | |
qsantos.fr
|
|
| | | | | This article will quickly explain the Rust types [T; N], &[T; N], &[T], Vec, &Vec with C code, and what the str, &str, String, OsString and CString add. Arrays and Slices Rust C [T; N] (array)Example: [i32; 100]Allocated on the stack T[N]Example: int[100]Allocated on the stack &[T; N] (array reference)Example: &[i32; 100]N is tracked at ... Continue reading Rust Strings for C Programmers ? | |
| | | | |
thomascountz.com
|
|
| | | | | Modelable | |
| | | | |
lemm.ee
|
|
| | | Lemmy | ||