検索

phrase: max: clip:
target: order:
Results of 1 - 10 of about 148 for println (0.004 sec.)
Rust By Example 日本語版 14445
Introduction 1. Hello World ❱ 1.1. コメント 1.2. フォーマットしてプリント ❱ 1.2.1. デバッグ 1.2. ... ext to the console // コンソールに文字列を出力する println!("Hello World!"); } println! は文字列をコンソールに ... をクリックしてアウトプットを見てみましょう。 次に、 println! マクロをもう一行追加してアウトプットがどうなるか見 ... によって無視されます。試しに実行してみてください // println!("Hello, world!"); // Run it. See? Now try deletin ... くなれば結果が変わります。 let x = 5 + /* 90 + */ 5; println!("Is `x` 10 or 100? x = {}", x); } 参照 ライブラリ ...
https://man.plustar.jp/rust/example/print.html - [similar]
ファイルシステムとのやり取り - Rust By Example 日本語版 9727
Introduction 1. Hello World ❱ 1.1. コメント 1.2. フォーマットしてプリント ❱ 1.2.1. デバッグ 1.2. ... Ok(_) => Ok(()), Err(e) => Err(e), } } fn main() { println!("`mkdir a`"); // Create a directory, returns `io: ... esult<()>` match fs::create_dir("a") { Err(why) => println!("! {:?}", why.kind()), Ok(_) => {}, } println!("` ... lo", &Path::new("a/b.txt")).unwrap_or_else(|why| { println!("! {:?}", why.kind()); }); println!("`mkdir -p a/ ... fs::create_dir_all("a/c/d").unwrap_or_else(|why| { println!("! {:?}", why.kind()); }); println!("`touch a/c/e ...
https://man.plustar.jp/rust/example/std_misc/fs.html - [similar]
文字列 - Rust By Example 日本語版 9023
Introduction 1. Hello World ❱ 1.1. コメント 1.2. フォーマットしてプリント ❱ 1.2.1. デバッグ 1.2. ... r = "the quick brown fox jumps over the lazy dog"; println!("Pangram: {}", pangram); // Iterate over words in ... イテレートする。新しい文字列の割り当ては起こらない。 println!("Words in reverse"); for word in pangram.split_wh ... itespace().rev() { println!("> {}", word); } // Copy chars into a vector, sor ... ed_str: &str = string.trim_matches(chars_to_trim); println!("Used characters: {}", trimmed_str); // Heap allo ...
https://man.plustar.jp/rust/example/std/str.html - [similar]
for と range - Rust By Example 日本語版 8589
Introduction 1. Hello World ❱ 1.1. コメント 1.2. フォーマットしてプリント ❱ 1.2.1. デバッグ 1.2. ... の値を取ります。 for n in 1..101 { if n % 15 == 0 { println!("fizzbuzz"); } else if n % 3 == 0 { println!("fiz ... z"); } else if n % 5 == 0 { println!("buzz"); } else { println!("{}", n); } } } 上記の ... の値を取ります。 for n in 1..=100 { if n % 15 == 0 { println!("fizzbuzz"); } else if n % 3 == 0 { println!("fiz ... z"); } else if n % 5 == 0 { println!("buzz"); } else { println!("{}", n); } } } forとイ ...
https://man.plustar.jp/rust/example/flow_control/for.html - [similar]
型キャスティング - Rust By Example 日本語版 8589
Introduction 1. Hello World ❱ 1.1. コメント 1.2. フォーマットしてプリント ❱ 1.2.1. デバッグ 1.2. ... decimal as char; // FIXME ^ Comment out this line println!("Casting: {} -> {} -> {}", decimal, integer, char ... // 1000 はすでにu16に収まっているため変化しない。 println!("1000 as a u16 is: {}", 1000 as u16); // 1000 - 2 ... tが使用され、残りの上位ビットが圧縮される形になる。 println!("1000 as a u8 is : {}", 1000 as u8); // -1 + 256 ... = 255 println!(" -1 as a u8 is : {}", (-1i8) as u8); // For posi ...
https://man.plustar.jp/rust/example/types/cast.html - [similar]
Rc - Rust By Example 日本語版 8261
Introduction 1. Hello World ❱ 1.1. コメント 1.2. フォーマットしてプリント ❱ 1.2.1. デバッグ 1.2. ... ) { let rc_examples = "Rc examples".to_string(); { println!("--- rc_a is created ---"); let rc_a: Rc<String> ... = Rc::new(rc_examples); println!("Reference Count of rc_a: {}", Rc::strong_count(& ... rc_a)); { println!("--- rc_a is cloned to rc_b ---"); let rc_b: Rc<S ... tring> = Rc::clone(&rc_a); println!("Reference Count of rc_b: {}", Rc::strong_count(& ...
https://man.plustar.jp/rust/example/std/rc.html - [similar]
イテレータ - Rust By Example 日本語版 8108
Introduction 1. Hello World ❱ 1.1. コメント 1.2. フォーマットしてプリント ❱ 1.2.1. デバッグ 1.2. ... ジェネレートする`Iterator` let mut sequence = 0..3; println!("Four consecutive `next` calls on 0..3"); println ... !("> {:?}", sequence.next()); println!("> {:?}", sequence.next()); println!("> {:?}", se ... quence.next()); println!("> {:?}", sequence.next()); // `for` works throug ... を // アンラップして変数(ここでは`i`)に束縛する。 println!("Iterate through 0..3 using `for`"); for i in 0.. ...
https://man.plustar.jp/rust/example/trait/iter.html - [similar]
ベクタ型 - Rust By Example 日本語版 7991
Introduction 1. Hello World ❱ 1.1. コメント 1.2. フォーマットしてプリント ❱ 1.2.1. デバッグ 1.2. ... collected_iterator: Vec<i32> = (0..10).collect(); println!("Collected (0..10) into: {:?}", collected_iterato ... マクロが使用できる。 let mut xs = vec![1i32, 2, 3]; println!("Initial vector: {:?}", xs); // Insert new elemen ... / 新しい要素をベクタの最後に挿入することができる。 println!("Push 4 into the vector"); xs.push(4); println!(" ... tor // `len`メソッドは現在のベクタのサイズを返す。 println!("Vector length: {}", xs.len()); // Indexing is do ...
https://man.plustar.jp/rust/example/std/vec.html - [similar]
if let - Rust By Example 日本語版 7885
Introduction 1. Hello World ❱ 1.1. コメント 1.2. フォーマットしてプリント ❱ 1.2.1. デバッグ 1.2. ... optional = Some(7); match optional { Some(i) => { println!("This is a really long string and `{:?}`", i); // ... ロック内(`{}`)を実行する。 if let Some(i) = number { println!("Matched {:?}!", i); } // If you need to specify ... 合、 // `else`を使用する。 if let Some(i) = letter { println!("Matched {:?}!", i); } else { // Destructure fail ... e. // デストラクト失敗の場合。このブロック内を実行 println!("Didn't match a number. Let's go with a letter!") ...
https://man.plustar.jp/rust/example/flow_control/if_let.html - [similar]
リテラルとオペレータ - Rust By Example 日本語版 7885
Introduction 1. Hello World ❱ 1.1. コメント 1.2. フォーマットしてプリント ❱ 1.2.1. デバッグ 1.2. ... す。 fn main() { // Integer addition // 整数の足し算 println!("1 + 2 = {}", 1u32 + 2); // Integer subtraction / ... / 整数の引き算 println!("1 - 2 = {}", 1i32 - 2); // TODO ^ Try changing ` ... Short-circuiting boolean logic // 単純な論理演算子 println!("true AND false is {}", true && false); println!( ... "true OR false is {}", true || false); println!("NOT true is {}", !true); // Bitwise operations / ...
https://man.plustar.jp/rust/example/primitives/literals.html - [similar]
PREV 1 2 3 4 5 6 7 8 9 10 NEXT